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:
@@ -13,7 +13,7 @@ namespace Barotrauma
|
|||||||
{
|
{
|
||||||
float volume = Math.Min(impact - 3.0f, 1.0f);
|
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;
|
Limb limb = (Limb)body.UserData;
|
||||||
|
|
||||||
@@ -23,7 +23,7 @@ namespace Barotrauma
|
|||||||
limb.HitSound.Play(volume, impact * 100.0f, limb.WorldPosition);
|
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)
|
if (!character.IsRemotePlayer || GameMain.Server != null)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -504,10 +504,7 @@ namespace Barotrauma
|
|||||||
|
|
||||||
ImpactProjSpecific(impact,f1.Body);
|
ImpactProjSpecific(impact,f1.Body);
|
||||||
|
|
||||||
if (f1.Body.UserData is Limb)
|
if ((f1.Body.UserData is Limb && character.Stun > 0f) || f1.Body == Collider.FarseerBody)
|
||||||
{
|
|
||||||
}
|
|
||||||
else if (f1.Body == Collider.FarseerBody)
|
|
||||||
{
|
{
|
||||||
if (!character.IsRemotePlayer || GameMain.Server != null)
|
if (!character.IsRemotePlayer || GameMain.Server != null)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user