self.flags &= ~FL_ONGROUND;
// dying animation
self.deadflag = DEAD_DYING;
- if(!g_ca)
- {
- // when to allow respawn
- sdelay = 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;
- }
- waves = cvar(strcat("g_", GetGametype(), "_respawn_waves"));
- if(!waves)
- waves = autocvar_g_respawn_waves;
- if(waves)
- self.respawn_time = ceil((time + sdelay) / waves) * waves;
- else
- self.respawn_time = time + sdelay;
- if(autocvar_g_respawn_delay_max > sdelay)
- self.respawn_time_max = time + autocvar_g_respawn_delay_max;
- else
- self.respawn_time_max = self.respawn_time;
- if((sdelay + waves >= 5.0) && (self.respawn_time - time > 1.75))
- self.respawn_countdown = 10; // first number to count down from is 10
- else
- self.respawn_countdown = -1; // do not count down
+
- if(g_cts || autocvar_g_forced_respawn)
- self.respawn_flags = self.respawn_flags | RESPAWN_FORCE;
- }
+ // when to allow respawn
+ calculate_player_respawn_time();
self.death_time = time;
if (random() < 0.5)