CSMultiplayerRules: Fix warnings.
This commit is contained in:
parent
8e3f5f2752
commit
f013035ffc
|
@ -45,9 +45,8 @@ CSMultiplayerRules::PlayerDeath(NSClientPlayer pl)
|
||||||
player targ = (player)g_dmg_eTarget;
|
player targ = (player)g_dmg_eTarget;
|
||||||
player attk = (player)g_dmg_eAttacker;
|
player attk = (player)g_dmg_eAttacker;
|
||||||
NSRenderableEntity newCorpse;
|
NSRenderableEntity newCorpse;
|
||||||
float deathAnimation;
|
float deathAnimation = ANIM_DEATH1;
|
||||||
|
|
||||||
/* TODO: death anims based on hit-regions */
|
|
||||||
if (targ.flags & FL_CROUCHING) {
|
if (targ.flags & FL_CROUCHING) {
|
||||||
deathAnimation = ANIM_CROUCH_DIE;
|
deathAnimation = ANIM_CROUCH_DIE;
|
||||||
} else {
|
} else {
|
||||||
|
@ -66,18 +65,21 @@ CSMultiplayerRules::PlayerDeath(NSClientPlayer pl)
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
bool isFacing = targ.IsFacingPosition(g_dmg_vecLocation);
|
bool isFacing = targ.IsFacingPosition(g_dmg_vecLocation);
|
||||||
deathAnimation = ANIM_DEATH1;
|
|
||||||
|
|
||||||
if (isFacing == false)
|
/* still want to play ANIM_DEATH1 */
|
||||||
deathAnimation = ANIM_DIE_FORWARD;
|
if (random() < 0.5f) {
|
||||||
else
|
if (isFacing == false) {
|
||||||
deathAnimation = ANIM_DIE_BACK;
|
deathAnimation = ANIM_DIE_FORWARD;
|
||||||
|
} else {
|
||||||
|
deathAnimation = ANIM_DIE_BACK;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
newCorpse = FX_Corpse_Spawn(targ, deathAnimation);
|
newCorpse = (NSRenderableEntity)FX_Corpse_Spawn(targ, deathAnimation);
|
||||||
|
|
||||||
targ.SpectatorDeathcam(newCorpse, attk, 3.0f);
|
targ.SpectatorDeathcam(newCorpse, attk, 3.0f);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue