- resetting the "blood overlay" when switching the controlled character
- fixed 1-section long walls being impossible to fix after their body has been destroyed - better looking blur (small lights aren't "skewed")
This commit is contained in:
@@ -29,7 +29,12 @@ namespace Barotrauma
|
||||
public static Character Controlled
|
||||
{
|
||||
get { return controlled; }
|
||||
set { controlled = value; }
|
||||
set
|
||||
{
|
||||
if (controlled == value) return;
|
||||
controlled = value;
|
||||
CharacterHUD.Reset();
|
||||
}
|
||||
}
|
||||
|
||||
private bool enabled;
|
||||
@@ -1246,11 +1251,11 @@ namespace Barotrauma
|
||||
return attackResult;
|
||||
}
|
||||
|
||||
public void StartStun(float stunTimer)
|
||||
public void StartStun(float stunTimer, bool allowStunDecrease = false)
|
||||
{
|
||||
if (stunTimer <= 0.0f || !MathUtils.IsValid(stunTimer)) return;
|
||||
if ((stunTimer <= 0.0f && !allowStunDecrease) || !MathUtils.IsValid(stunTimer)) return;
|
||||
|
||||
AnimController.ResetPullJoints();
|
||||
if (Math.Sign(stunTimer) != Math.Sign(AnimController.StunTimer)) AnimController.ResetPullJoints();
|
||||
AnimController.StunTimer = Math.Max(AnimController.StunTimer, stunTimer);
|
||||
|
||||
selectedConstruction = null;
|
||||
@@ -1681,7 +1686,7 @@ namespace Barotrauma
|
||||
}
|
||||
|
||||
float newStunTimer = message.ReadRangedSingle(0.0f, 60.0f, 8);
|
||||
StartStun(newStunTimer);
|
||||
StartStun(newStunTimer, true);
|
||||
|
||||
Oxygen = message.ReadRangedSingle(-100.0f,100.0f, 8);
|
||||
Bleeding = message.ReadRangedSingle(0.0f, 5.0f, 8);
|
||||
|
||||
@@ -20,6 +20,11 @@ namespace Barotrauma
|
||||
|
||||
private static float damageOverlayTimer;
|
||||
|
||||
public static void Reset()
|
||||
{
|
||||
damageOverlayTimer = 0.0f;
|
||||
}
|
||||
|
||||
public static void TakeDamage(float amount)
|
||||
{
|
||||
healthBar.Flash();
|
||||
|
||||
Reference in New Issue
Block a user