frag_target = self;
MUTATOR_CALLHOOK(PlayerDies);
- if(g_freezetag)
- return;
-
if(self.flagcarried)
{
if(attacker.classname != "player" && attacker.classname != "gib")
Portal_ClearAllLater(self);
// clear waypoints
WaypointSprite_PlayerDead();
+
+ if(clienttype(self) == CLIENTTYPE_REAL)
+ {
+ stuffcmd(self, "-zoom\n");
+ self.fixangle = TRUE;
+ //msg_entity = self;
+ //WriteByte (MSG_ONE, SVC_SETANGLE);
+ //WriteAngle (MSG_ONE, self.v_angle_x);
+ //WriteAngle (MSG_ONE, self.v_angle_y);
+ //WriteAngle (MSG_ONE, 80);
+ }
+
+ if(defer_ClientKill_Now_TeamChange) // TODO does this work with FreezeTag?
+ ClientKill_Now_TeamChange();
+
+ if(g_arena)
+ Spawnqueue_Unmark(self);
+
+ if(g_freezetag)
+ return;
+
// make the corpse upright (not tilted)
self.angles_x = 0;
self.angles_z = 0;
waves = 0;
sdelay = cvar(strcat("g_", GetGametype(), "_respawn_delay"));
if(!sdelay)
- {
- if(g_cts)
- sdelay = 0; // no respawn delay in CTS
- else
- sdelay = autocvar_g_respawn_delay;
- }
+ {
+ if(g_cts)
+ sdelay = 0; // no respawn delay in CTS
+ else
+ sdelay = autocvar_g_respawn_delay;
+ }
waves = cvar(strcat("g_", GetGametype(), "_respawn_waves"));
if(!waves)
waves = autocvar_g_respawn_waves;
// set up to fade out later
SUB_SetFade (self, time + 6 + random (), 1);
- if(clienttype(self) == CLIENTTYPE_REAL)
- {
- self.fixangle = TRUE;
- //msg_entity = self;
- //WriteByte (MSG_ONE, SVC_SETANGLE);
- //WriteAngle (MSG_ONE, self.v_angle_x);
- //WriteAngle (MSG_ONE, self.v_angle_y);
- //WriteAngle (MSG_ONE, 80);
- }
-
- if(g_arena)
- Spawnqueue_Unmark(self);
-
- if(defer_ClientKill_Now_TeamChange)
- ClientKill_Now_TeamChange();
-
if(sv_gentle > 0 || autocvar_ekg) {
// remove corpse
PlayerCorpseDamage (inflictor, attacker, 100.0, deathtype, hitloc, force);
}
// reset fields the weapons may use just in case
- for (j = WEP_FIRST; j <= WEP_LAST; ++j)
+ for (j = WEP_FIRST; j <= WEP_LAST; ++j)
{
- weapon_action(j, WR_RESETPLAYER);
+ weapon_action(j, WR_RESETPLAYER);
ATTACK_FINISHED_FOR(self, j) = 0;
}
}