END WORM, fixed camera pos "twitching" when exiting/entering the sub, character scaling

This commit is contained in:
Regalis
2015-12-19 02:05:10 +02:00
parent eb0e08c8ee
commit 4234aa2094
16 changed files with 144 additions and 28 deletions
+10 -2
View File
@@ -869,8 +869,16 @@ namespace Barotrauma
Submarine = AnimController.CurrentHull == null ? null : Submarine.Loaded;
obstructVisionAmount = Math.Max(obstructVisionAmount - deltaTime, 0.0f);
AnimController.SimplePhysicsEnabled = (Character.controlled != this && Vector2.Distance(cam.WorldViewCenter, WorldPosition) > 5000.0f);
float dist = Vector2.Distance(cam.WorldViewCenter, WorldPosition);
if (dist > 8000.0f)
{
AnimController.SimplePhysicsEnabled = true;
}
else if (dist < 7000.0f)
{
AnimController.SimplePhysicsEnabled = false;
}
if (isDead) return;