Changes to submarine<->outside teleporting logic:

- contacts between limbs and the sub are temporarily disabled before teleporting to prevent the character from "exploding"
- impact damage is disabled for 0.25 seconds after teleporting in case the character still explodes
- characters with disabled impact damage won't damage the walls when hitting
- the collider of SubmarineBody is generated based on walls instead of hulls
- fixed Submarine.CheckVisibilit ignoring fixtures with (CollisionWall | CollisionLevel) collisioncategory
This commit is contained in:
Regalis
2016-05-18 11:43:22 +03:00
parent be72fee824
commit 63e5f02057
7 changed files with 184 additions and 94 deletions
+3 -6
View File
@@ -414,14 +414,11 @@ namespace Barotrauma
if (burnt > 0.0f) Burnt -= deltaTime;
if (LinearVelocity.X>100.0f)
if (LinearVelocity.X > 500.0f)
{
//DebugConsole.ThrowError("CHARACTER EXPLODED");
foreach (Limb limb in character.AnimController.Limbs)
{
limb.body.ResetDynamics();
limb.body.SetTransform(character.AnimController.RefLimb.SimPosition, 0.0f);
}
body.ResetDynamics();
body.SetTransform(character.AnimController.RefLimb.SimPosition, 0.0f);
}
if (inWater)