r4093 - in trunk/data: . qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Sun Aug 10 11:13:21 EDT 2008
Author: div0
Date: 2008-08-10 11:13:20 -0400 (Sun, 10 Aug 2008)
New Revision: 4093
Modified:
trunk/data/defaultNexuiz.cfg
trunk/data/qcsrc/server/arena.qc
trunk/data/qcsrc/server/clientcommands.qc
trunk/data/qcsrc/server/g_damage.qc
trunk/data/qcsrc/server/gamecommand.qc
Log:
new command "allready" (for vcall/vdo); fix shootable buttons in independent players mode
Modified: trunk/data/defaultNexuiz.cfg
===================================================================
--- trunk/data/defaultNexuiz.cfg 2008-08-10 12:44:54 UTC (rev 4092)
+++ trunk/data/defaultNexuiz.cfg 2008-08-10 15:13:20 UTC (rev 4093)
@@ -688,7 +688,7 @@
bind kp_minus "+userbind 15"
// these commands can be voted
-set sv_vote_commands "restart timelimit fraglimit chmap gotomap g_grappling_hook sv_defaultplayer_fbskin_green sv_defaultplayer_fbskin_red sv_defaultplayer_fbskin_orange sv_defaultplayer_fbskin_off endmatch reducematchtime extendmatchtime"
+set sv_vote_commands "restart timelimit fraglimit chmap gotomap g_grappling_hook sv_defaultplayer_fbskin_green sv_defaultplayer_fbskin_red sv_defaultplayer_fbskin_orange sv_defaultplayer_fbskin_off endmatch reducematchtime extendmatchtime allready"
// users can call a vote for the above commands
set sv_vote_call 1
// users can call a vote to become master
@@ -1076,3 +1076,5 @@
sv_allowdownloads_inarchive 1 // for csprogs.dat
set g_jump_grunt 0 // Do you make a grunting noise every time you jump? Is it the same grunting noise every time?
+
+alias allready "sv_cmd allready"
Modified: trunk/data/qcsrc/server/arena.qc
===================================================================
--- trunk/data/qcsrc/server/arena.qc 2008-08-10 12:44:54 UTC (rev 4092)
+++ trunk/data/qcsrc/server/arena.qc 2008-08-10 15:13:20 UTC (rev 4093)
@@ -150,6 +150,8 @@
if(g_arena)
if(champion)
UpdateFrags(champion, +1);
+
+ Score_ClearAll();
}
void Spawnqueue_Insert(entity e)
Modified: trunk/data/qcsrc/server/clientcommands.qc
===================================================================
--- trunk/data/qcsrc/server/clientcommands.qc 2008-08-10 12:44:54 UTC (rev 4092)
+++ trunk/data/qcsrc/server/clientcommands.qc 2008-08-10 15:13:20 UTC (rev 4093)
@@ -378,40 +378,10 @@
}
}
-/**
- * Counts how many players are ready. If not enough players are ready, the function
- * does nothing. If all players are ready, the timelimit will be extended and the
- * restart_countdown variable is set to allow other functions like PlayerPostThink
- * to detect that the countdown is now active. If the cvar sv_ready_restart_after_countdown
- * is not set the map will be resetted.
- *
- * Function is called after the server receives a 'ready' sign from a player.
- */
-void ReadyCount()
+void ReadyRestart()
{
local entity e;
- local float r, p;
- FOR_EACH_REALPLAYER(e)
- {
- p += 1;
- if(e.ready)
- r += 1;
- }
-
- if(cvar("sv_ready_restart_nag")) {
- if(!readyNagActive) {
- readyNagger = spawn();
- readyNagger.think = readyNagger_Think;
- readyNagger.cnt = cvar("sv_ready_restart_nag_duration");
- readyNagger.nextthink = time;
- readyNagActive = 1;
- }
- }
-
- if(!p || r < p)
- return;
-
bprint("^1Server is restarting...\n");
// no arena, assault support yet...
@@ -435,7 +405,6 @@
start_health = cvar("g_balance_health_start");
start_armorvalue = cvar("g_balance_armor_start");
}
-
restart_countdown = time + RESTART_COUNTDOWN;
restart_mapalreadyrestarted = 0; //reset this var, needed when cvar sv_ready_restart_repeatable is in use
//reset the .ready status of all players (also spectators)
@@ -452,6 +421,7 @@
if(timelimit_orig)
cvar_set("timelimit", ftos(timelimit_orig + ceil(restart_countdown)/60));
}
+
if(cvar("teamplay_lockonrestart") && teams_matter) {
lockteams = 1;
bprint("^1The teams are now locked.\n");
@@ -477,16 +447,50 @@
//reset map immediately if this cvar is not set
if (!cvar("sv_ready_restart_after_countdown"))
- {
reset_map();
- Score_ClearAll();
- }
if(cvar("sv_eventlog"))
GameLogEcho(":restart", FALSE);
}
/**
+ * Counts how many players are ready. If not enough players are ready, the function
+ * does nothing. If all players are ready, the timelimit will be extended and the
+ * restart_countdown variable is set to allow other functions like PlayerPostThink
+ * to detect that the countdown is now active. If the cvar sv_ready_restart_after_countdown
+ * is not set the map will be resetted.
+ *
+ * Function is called after the server receives a 'ready' sign from a player.
+ */
+void ReadyCount()
+{
+ local entity e;
+ local float r, p;
+
+ FOR_EACH_REALPLAYER(e)
+ {
+ p += 1;
+ if(e.ready)
+ r += 1;
+ }
+
+ if(cvar("sv_ready_restart_nag")) {
+ if(!readyNagActive) {
+ readyNagger = spawn();
+ readyNagger.think = readyNagger_Think;
+ readyNagger.cnt = cvar("sv_ready_restart_nag_duration");
+ readyNagger.nextthink = time;
+ readyNagActive = 1;
+ }
+ }
+
+ if(!p || r < p)
+ return;
+
+ ReadyRestart();
+}
+
+/**
* Centerprints the information to all players who didn't ready up yet to do so.
*/
void readyNagger_Think() {
Modified: trunk/data/qcsrc/server/g_damage.qc
===================================================================
--- trunk/data/qcsrc/server/g_damage.qc 2008-08-10 12:44:54 UTC (rev 4092)
+++ trunk/data/qcsrc/server/g_damage.qc 2008-08-10 15:13:20 UTC (rev 4093)
@@ -515,7 +515,7 @@
if(deathtype != DEATH_TELEFRAG)
if(attacker.classname == "player")
{
- if(independent_players && targ != attacker)
+ if(independent_players && targ != attacker && targ.classname == "player")
{
damage = 0;
force = '0 0 0';
Modified: trunk/data/qcsrc/server/gamecommand.qc
===================================================================
--- trunk/data/qcsrc/server/gamecommand.qc 2008-08-10 12:44:54 UTC (rev 4092)
+++ trunk/data/qcsrc/server/gamecommand.qc 2008-08-10 15:13:20 UTC (rev 4093)
@@ -206,6 +206,10 @@
{
Score_DebugPrint();
}
+ if (argv(0) == "allready")
+ {
+ ReadyRestart();
+ }
print("Invalid command. For a list of supported commands, try sv_cmd help.\n");
}
More information about the nexuiz-commits
mailing list