Fixed ragdolled players suffering less impact damage than non-ragdolled one.

Also fixed limb impact sounds on the clientside for ragdolls
This commit is contained in:
Alex Noir
2017-12-05 23:03:40 +03:00
parent f37323e9a8
commit b26b6a7418
2 changed files with 3 additions and 6 deletions

View File

@@ -13,7 +13,7 @@ namespace Barotrauma
{
float volume = Math.Min(impact - 3.0f, 1.0f);
if (body.UserData is Limb)
if (body.UserData is Limb && character.Stun <= 0f)
{
Limb limb = (Limb)body.UserData;
@@ -23,7 +23,7 @@ namespace Barotrauma
limb.HitSound.Play(volume, impact * 100.0f, limb.WorldPosition);
}
}
else if (body == Collider.FarseerBody)
else if (body.UserData is Limb || body == Collider.FarseerBody)
{
if (!character.IsRemotePlayer || GameMain.Server != null)
{

View File

@@ -504,10 +504,7 @@ namespace Barotrauma
ImpactProjSpecific(impact,f1.Body);
if (f1.Body.UserData is Limb)
{
}
else if (f1.Body == Collider.FarseerBody)
if ((f1.Body.UserData is Limb && character.Stun > 0f) || f1.Body == Collider.FarseerBody)
{
if (!character.IsRemotePlayer || GameMain.Server != null)
{