r2137 - branches/nexuiz-2.0/data/qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Mon Jan 22 08:02:58 EST 2007
Author: div0
Date: 2007-01-22 08:02:58 -0500 (Mon, 22 Jan 2007)
New Revision: 2137
Modified:
branches/nexuiz-2.0/data/qcsrc/server/cl_player.qc
Log:
if g_respawn_mapsettings is on, respawn settings can be set by the mapcfg using g_respawn_mapsettings_delay and g_respawn_mapsettings_waves
Modified: branches/nexuiz-2.0/data/qcsrc/server/cl_player.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/cl_player.qc 2007-01-22 13:01:25 UTC (rev 2136)
+++ branches/nexuiz-2.0/data/qcsrc/server/cl_player.qc 2007-01-22 13:02:58 UTC (rev 2137)
@@ -312,11 +312,20 @@
// dying animation
self.deadflag = DEAD_DYING;
// when to allow respawn
- sdelay = cvar(strcat("g_", GetGametype(), "_respawn_delay"));
+ sdelay = 0;
+ waves = 0;
+ if(cvar("g_respawn_mapsettings"))
+ {
+ sdelay = cvar("g_respawn_mapsettings_delay");
+ waves = cvar("g_respawn_mapsettings_waves");
+ }
if(!sdelay)
+ sdelay = cvar(strcat("g_", GetGametype(), "_respawn_delay"));
+ if(!sdelay)
sdelay = cvar("g_respawn_delay");
- waves = cvar(strcat("g_", GetGametype(), "_respawn_waves"));
if(!waves)
+ waves = cvar(strcat("g_", GetGametype(), "_respawn_waves"));
+ if(!waves)
waves = cvar("g_respawn_waves");
if(waves)
self.death_time = ceil((time + sdelay) / waves) * waves;
More information about the nexuiz-commits
mailing list