Simple MapEntity visibility culling (structures outside the camera view or items with nothing to render aren't drawn)
Could be optimized further, but already gives a pretty nice performance boost
This commit is contained in:
@@ -319,6 +319,11 @@ namespace Barotrauma
|
||||
mapEntityList.Insert(i, this);
|
||||
}
|
||||
|
||||
public virtual bool IsVisible(Rectangle worldView)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public virtual void Draw(SpriteBatch spriteBatch, bool editing, bool back=true) {}
|
||||
|
||||
public virtual void DrawDamage(SpriteBatch spriteBatch, Effect damageEffect) {}
|
||||
|
||||
Reference in New Issue
Block a user