Cherry-picked 0ff9a3d (more ragdoll optimization)
This commit is contained in:
@@ -783,12 +783,6 @@ 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)
|
||||
@@ -851,6 +845,12 @@ namespace Barotrauma
|
||||
MathHelper.Clamp(body.LinearVelocity.X, -MaxVel, MaxVel),
|
||||
MathHelper.Clamp(body.LinearVelocity.Y, -MaxVel, MaxVel));
|
||||
}
|
||||
|
||||
if (CurrentHull == null && body.SimPosition.Y < ConvertUnits.ToSimUnits(Level.MaxEntityDepth))
|
||||
{
|
||||
Spawner.AddToRemoveQueue(this);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
UpdateNetPosition();
|
||||
|
||||
Reference in New Issue
Block a user