Skip to content

Commit

Permalink
HLMultiplayerRules: Fix some warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
eukara committed Mar 7, 2024
1 parent 00827d4 commit d33059c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/server/gamerules_multiplayer.qc
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ HLMultiplayerRules::PlayerDeath(NSClientPlayer pl)
float gibStrength = g_dmg_iDamage * 2.0f;
BreakModel_Entity(pl, gibDir, gibStrength);
} else {
float deathAnimation;
float deathAnimation = ANIM_DIESIMPLE;

switch (g_dmg_iHitBody) {
case BODY_HEAD:
Expand All @@ -147,8 +147,9 @@ HLMultiplayerRules::PlayerDeath(NSClientPlayer pl)
break;
default:
bool isFacing = pl.IsFacingPosition(g_dmg_vecLocation);
deathAnimation = ANIM_DIESIMPLE;

/* we still want a change to play ANIM_DIESIMPLE */
if (random() < 0.5)
if (isFacing == false) {
deathAnimation = ANIM_DIEFORWARD;
} else {
Expand Down

0 comments on commit d33059c

Please sign in to comment.