Failsafe for when no hiders_changed_sound is defined.
parent
499b2142d2
commit
3b3dd02382
|
@ -356,12 +356,15 @@ onPlayerKilled(eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, vDir, sHit
|
|||
if (IsDefined(player.customModel))
|
||||
{
|
||||
player.customModel Delete();
|
||||
if (IsDefined(game["hiders_changed_sound"]))
|
||||
player PlaySound(game["hiders_changed_sound"]);
|
||||
}
|
||||
|
||||
// If victim had a custom model set, reset it
|
||||
if (IsDefined(player.originalModel))
|
||||
{
|
||||
player SetModel(player.originalModel);
|
||||
if (IsDefined(game["hiders_changed_sound"]))
|
||||
player PlaySound(game["hiders_changed_sound"]);
|
||||
player.originalModel = undefined;
|
||||
}
|
||||
|
@ -798,6 +801,7 @@ enableModelChange(playerCommand) {
|
|||
newhealth = healthfrac * (trace["entity"] GetNormalHealth());
|
||||
|
||||
player SetModel(trace["entity"].model);
|
||||
if (IsDefined(game["hiders_changed_sound"]))
|
||||
player PlaySound(game["hiders_changed_sound"]);
|
||||
|
||||
player.health = newhealth;
|
||||
|
|
Loading…
Reference in New Issue