Skip to content

Commit

Permalink
xrGame/PHMovementControl.cpp: fix eHitTypePhysicStrike usage (OpenXRa…
Browse files Browse the repository at this point in the history
…y#382)

It should only be used in multiplayer

Moved case ALife::eHitTypePhysicStrike in CPHMovementControl::ApplyHit a
bit lower. (cosmetical change)
  • Loading branch information
Xottab-DUTY authored and antoncxx committed Mar 3, 2024
1 parent eacb445 commit 6db9d50
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/xrGame/PHMovementControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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 ;
Expand All @@ -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;
}
}
Expand Down

0 comments on commit 6db9d50

Please sign in to comment.