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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user