GarageGames / Torque2D

MIT Licensed Open Source version of Torque 2D game engine from GarageGames
MIT License
1.67k stars 1.56k forks source link

CompositeSprite LocalPosition Bug #353

Closed greenfire27 closed 8 years ago

greenfire27 commented 8 years ago

This fixes a bug with the CompositeSprite. When setting the local position of a sprite within a CompositeSprite the SpatialDirty flag needs to be set to true for the Sprite to be redrawn at the new position. The occurs when the CompositeSprite is moving, rotating, or if the CompositeSprite automatically changes size because of the sprite relocation. However, if the CompositeSprite is still, the inner sprite will not be redrawn at the new location. This change fixes that simply by setting the SpatialDirty flag to true when the inner sprite is moved.