Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix SpriteEffect not updating ScreenMap #14048
Why are their effects with bounds of zero in the first place? What use do they have? I know we had to exclude some actors with zero bounds because they're invisible markers for things, is that the case here as well?
If we do need the bounds check, the way it was applied previously for actors and such was further up the call stack:
if (!self.Bounds.Size.IsEmpty) self.World.ScreenMap.Add(self);
So I guess we would want similar checks for consistency, if we do need to add them.
For actors we have always used a fixed size regardless of their current rendered state, but for effects we are updating them every tick to reflect what is actually visible. The issue comes when the effect legitimately doesn't want to render something during one of the frames of its animation.
IMO handing this lower level in the stack is cleaner, and we will eventually need to do something similar for actors as part of the fix for bibs and shadows.