Moved teleport variables into teleport.inc. Changed order of death event on infection. Known bug: Teamkill on last zombie kill.

This commit is contained in:
richard
2009-04-21 03:27:12 +02:00
parent 0f15efaa85
commit 0bf074bf7a
4 changed files with 54 additions and 50 deletions

View File

@ -210,8 +210,7 @@ public Action:PlayerDeath(Handle:event, const String:name[], bool:dontBroadcast)
new index = GetClientOfUserId(GetEventInt(event, "userid"));
new attacker = GetClientOfUserId(GetEventInt(event, "attacker"));
// Reset field of view and extinguish fire.
SetPlayerFOV(index, DEFAULT_FOV);
// Extinguish fire.
ExtinguishEntity(index);
// Get the weapon name.
@ -243,9 +242,11 @@ public Action:PlayerDeath(Handle:event, const String:name[], bool:dontBroadcast)
}
else
{
// Reset field of view.
SetPlayerFOV(index, DEFAULT_FOV);
if (IsPlayerZombie(index))
{
// Give kill bonus.
if (ZRIsValidClient(attacker))
{
@ -253,15 +254,15 @@ public Action:PlayerDeath(Handle:event, const String:name[], bool:dontBroadcast)
AddPlayerScore(attacker, bonus);
}
}
// Forward event to modules.
ClassOnClientDeath(index);
SEffectsOnClientDeath(index);
SpawnProtectOnClientDeath(index);
RespawnOnClientDeath(index, attacker, weapon);
ZHPOnClientDeath(index);
}
// Forward event to modules.
ClassOnClientDeath(index);
SEffectsOnClientDeath(index);
SpawnProtectOnClientDeath(index);
RespawnOnClientDeath(index, attacker, weapon);
ZHPOnClientDeath(index);
new RoundEndOutcome:outcome;
if (RoundEndGetRoundStatus(outcome))
{