From 4c714cbab9ccf119f92a9b39027df561f003e5a4 Mon Sep 17 00:00:00 2001 From: Xottab-DUTY Date: Mon, 26 Feb 2024 09:52:25 +0500 Subject: [PATCH] xrGame/PHMovementControl.cpp: fix eHitTypePhysicStrike usage (#382) It should only be used in multiplayer Moved case ALife::eHitTypePhysicStrike in CPHMovementControl::ApplyHit a bit lower. (cosmetical change) --- src/xrGame/PHMovementControl.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/xrGame/PHMovementControl.cpp b/src/xrGame/PHMovementControl.cpp index af825c255aa..1e3b113bd7b 100644 --- a/src/xrGame/PHMovementControl.cpp +++ b/src/xrGame/PHMovementControl.cpp @@ -102,8 +102,9 @@ static ALife::EHitType DefineCollisionHitType(u16 material_idx) { if (GMLib.GetMaterialByIdx(material_idx)->Flags.test(SGameMtl::flInjurious)) return ALife::eHitTypeRadiation; + return ALife::eHitTypeStrike; } - else if (ShadowOfChernobylMode || ClearSkyMode) + if (ShadowOfChernobylMode || ClearSkyMode) return ALife::eHitTypePhysicStrike; return ALife::eHitTypeStrike; } @@ -1285,7 +1286,6 @@ void CPHMovementControl::ApplyHit(const Fvector& dir, const float P, ALife::EHit case ALife::eHitTypeBurn:; // stop case ALife::eHitTypeShock:; // stop case ALife::eHitTypeStrike:; // stop - case ALife::eHitTypePhysicStrike: // stop case ALife::eHitTypeWound: SetVelocity(Fvector().set(0, 0, 0)); break; // stop ; @@ -1296,8 +1296,9 @@ void CPHMovementControl::ApplyHit(const Fvector& dir, const float P, ALife::EHit break; // not stop case ALife::eHitTypeExplosion:; // stop case ALife::eHitTypeFireWound:; // stop - case ALife::eHitTypeWound_2:; - break; // stop //knife's alternative fire + case ALife::eHitTypeWound_2:; // stop //knife's alternative fire + case ALife::eHitTypePhysicStrike: // stop + break; // stop default: NODEFAULT; } }