If you had a sprite on the display list using the LightPipeline, followed by a Mesh using the LightPipeline, and you invalidated the mesh (i.e. by rotating it), it would cause a runtime error in the current batch. Fix #6822

This commit is contained in:
Richard Davey 2024-08-06 23:59:42 +01:00
parent c5d8c7e04c
commit 13035a6718
No known key found for this signature in database

View file

@ -292,6 +292,13 @@ var LightPipeline = new Class({
rotation = gameObject.rotation;
}
if (this.currentBatch === null)
{
this.createBatch(texture);
this.addTextureToBatch(normalMap);
}
this.setNormalMapRotation(rotation);
return 0;
@ -339,6 +346,13 @@ var LightPipeline = new Class({
this.setNormalMapRotation(gameObject.rotation);
}
if (this.currentBatch === null)
{
this.createBatch(texture);
this.addTextureToBatch(normalMap);
}
return 0;
},