Submarines, items and characters that reach a depth of 300,000 units (~4000 m) are automatically disabled. Avoids the unnecessary cost of updating entities that are way too deep to be reached by anyone.
This commit is contained in:
@@ -779,6 +779,12 @@ namespace Barotrauma
|
||||
|
||||
public override void Update(float deltaTime, Camera cam)
|
||||
{
|
||||
if (Level.Loaded != null && WorldPosition.Y < Level.MaxEntityDepth)
|
||||
{
|
||||
Spawner.AddToRemoveQueue(this);
|
||||
return;
|
||||
}
|
||||
|
||||
ApplyStatusEffects(ActionType.Always, deltaTime, null);
|
||||
|
||||
foreach (ItemComponent ic in components)
|
||||
|
||||
Reference in New Issue
Block a user