Added collider to humanhusk.xml, disabled the "zoom effect" when under pressure as a huskified human
This commit is contained in:
@@ -9,8 +9,11 @@
|
|||||||
movementlerp="0.4"
|
movementlerp="0.4"
|
||||||
legtorque="15.0"
|
legtorque="15.0"
|
||||||
thightorque="-5.0"
|
thightorque="-5.0"
|
||||||
walkspeed="2.0"
|
walkspeed="1.5"
|
||||||
swimspeed="2.0">
|
swimspeed="2.5"
|
||||||
|
impacttolerance="7.5">
|
||||||
|
|
||||||
|
<collider height="100" radius="15"/>
|
||||||
|
|
||||||
<!-- head -->
|
<!-- head -->
|
||||||
<limb id = "0" radius="13" mass = "6" type="Head" attackpriority="2">
|
<limb id = "0" radius="13" mass = "6" type="Head" attackpriority="2">
|
||||||
|
|||||||
@@ -1052,17 +1052,18 @@ namespace Barotrauma
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (moveCam)
|
if (moveCam && needsAir)
|
||||||
{
|
{
|
||||||
float pressureEffect = 0.0f;
|
if (pressureProtection < 80.0f &&
|
||||||
|
(AnimController.CurrentHull == null || AnimController.CurrentHull.LethalPressure > 50.0f))
|
||||||
if (pressureProtection < 80.0f && AnimController.CurrentHull != null && AnimController.CurrentHull.LethalPressure > 50.0f)
|
|
||||||
{
|
{
|
||||||
|
float pressure = AnimController.CurrentHull == null ? 100.0f : AnimController.CurrentHull.LethalPressure;
|
||||||
|
|
||||||
cam.Zoom = MathHelper.Lerp(cam.Zoom,
|
cam.Zoom = MathHelper.Lerp(cam.Zoom,
|
||||||
(AnimController.CurrentHull.LethalPressure / 50.0f) * Rand.Range(1.0f, 1.05f),
|
(pressure / 50.0f) * Rand.Range(1.0f, 1.05f),
|
||||||
(AnimController.CurrentHull.LethalPressure - 50.0f) / 50.0f);
|
(pressure - 50.0f) / 50.0f);
|
||||||
}
|
}
|
||||||
cam.OffsetAmount = MathHelper.Lerp(cam.OffsetAmount, (Submarine == null ? 400.0f : 250.0f)+pressureEffect, 0.05f);
|
cam.OffsetAmount = MathHelper.Lerp(cam.OffsetAmount, 250.0f, 0.05f);
|
||||||
}
|
}
|
||||||
|
|
||||||
cursorPosition = cam.ScreenToWorld(PlayerInput.MousePosition);
|
cursorPosition = cam.ScreenToWorld(PlayerInput.MousePosition);
|
||||||
|
|||||||
Reference in New Issue
Block a user