]> icculus.org git repositories - divverent/nexuiz.git/blob - data/qcsrc/server/clientcommands.qc
fix wrong vote message
[divverent/nexuiz.git] / data / qcsrc / server / clientcommands.qc
1 void ReadyCount();
2 string MapVote_Suggest(string m);
3
4 .float floodcontrol_chat;
5 .float floodcontrol_team;
6 void Say(entity source, float teamsay, string msgin)
7 {
8         string msgstr, colorstr, cmsgstr, namestr;
9         float flood;
10         entity head;
11
12         if(Ban_MaybeEnforceBan(source))
13                 return;
14
15         if(!teamsay)
16                 if(substring(msgin, 0, 1) == " ")
17                         msgin = substring(msgin, 1, strlen(msgin) - 1); // work around DP say bug (say_team does not have this!)
18
19         msgin = formatmessage(msgin);
20
21         if(msgin == "")
22                 return;
23
24         if(source.classname != "player")
25                 colorstr = "^0"; // black for spectators
26         else if(teams_matter)
27                 colorstr = Team_ColorCode(source.team);
28         else
29                 teamsay = FALSE;
30
31         if(intermission_running)
32                 teamsay = FALSE;
33
34         /*
35          * using bprint solves this... me stupid
36         // how can we prevent the message from appearing in a listen server?
37         // for now, just give "say" back and only handle say_team
38         if(!teamsay)
39         {
40                 clientcommand(self, strcat("say ", msgin));
41                 return;
42         }
43         */
44
45         if(cvar("g_chat_teamcolors"))
46                 namestr = playername(source);
47         else
48                 namestr = source.netname;
49         if(teamsay)
50         {
51                 msgstr = strzone(strcat("\{1}\{13}", colorstr, "(^3", namestr, colorstr, ") ^7", msgin, "\n"));
52                 cmsgstr = strcat(colorstr, "(^3", namestr, colorstr, ")\n^7", wordwrap(msgin, 50));
53         }
54         else
55                 msgstr = strzone(strcat("\{1}", namestr, "^7: ", msgin, "\n"));
56
57         // FLOOD CONTROL
58         flood = 0;
59         {
60                 float flood_spl;
61                 float flood_burst;
62                 float flood_lmax;
63                 var .float flood_field;
64                 float lines;
65                 if(teamsay)
66                 {
67                         flood_spl = cvar("g_chat_flood_spl_team");
68                         flood_burst = cvar("g_chat_flood_burst_team");
69                         flood_lmax = cvar("g_chat_flood_lmax_team");
70                         flood_field = floodcontrol_team;
71                 }
72                 else
73                 {
74                         flood_spl = cvar("g_chat_flood_spl");
75                         flood_burst = cvar("g_chat_flood_burst");
76                         flood_lmax = cvar("g_chat_flood_lmax");
77                         flood_field = floodcontrol_chat;
78                 }
79                 flood_burst = max(0, flood_burst - 1);
80                 // to match explanation in default.cfg, a value of 3 must allow three-line bursts and not four!
81                 lines = ceil(strlennocol(msgstr) / 75);
82                 if(flood_lmax && lines > flood_lmax)
83                         flood = 2;
84                 else if(time >= self.flood_field)
85                         self.flood_field = max(time - flood_burst * flood_spl, self.flood_field) + lines * flood_spl;
86                 else
87                         flood = 1;
88         }
89
90         if(flood)
91         {
92                 if(cvar("g_chat_flood_notify_flooder"))
93                 {
94                         if(flood == 1)
95                                 sprint(self, strcat("^3FLOOD CONTROL: ^7wait ^1", ftos(self.flood_field - time), "^3 seconds\n"));
96                         else if(flood == 2)
97                                 sprint(self, "^3FLOOD CONTROL: ^7message too long\n");
98                 }
99                 else
100                         sprint(self, msgstr);
101                 print("NOTE: ", playername(self), "^7 is flooding.\n");
102         }
103         else if(teamsay)
104         {
105                 if(source.classname == "player")
106                 {
107                         FOR_EACH_REALPLAYER(head)
108                         {
109                                 if(head.team == source.team)
110                                 {
111                                         sprint(head, msgstr);
112                                         centerprint(head, cmsgstr);
113                                 }
114                         }
115                 }
116                 else
117                 {
118                         FOR_EACH_REALCLIENT(head) if(head.classname != "player")
119                         {
120                                 sprint(head, msgstr);
121                                 centerprint(head, cmsgstr);
122                         }
123                 }
124         }
125         else
126         {
127                 // TODO invent a cvar name for allowing global chat by spectators during warmup anyway
128                 if(cvar("g_chat_nospectators") && source.classname != "player") {
129                         FOR_EACH_REALCLIENT(head) if(head.classname != "player") {
130                                 sprint(head, msgstr);
131                         }
132                 }
133                 else
134                         bprint(msgstr);
135         }
136
137         strunzone(msgstr);
138 }
139
140 entity GetPlayer(string name)
141 {
142         float num;
143         entity e;
144         string ns;
145
146         if(substring(name, 0, 1) == "#") {
147                 num = stof(substring(name, 1, 999));
148                 if(num >= 1 && num <= maxclients) {
149                         for((e = world); num > 0; --num, (e = nextent(e)))
150                                 ;
151                         //if(clienttype(e) == CLIENTTYPE_REAL)
152                         if(e.classname == "player")
153                                 return e;
154                 }
155         } else {
156                 ns = strdecolorize(name);
157                 FOR_EACH_REALPLAYER(e) {
158                         if(!strcasecmp(strdecolorize(e.netname), ns)) {
159                                 return e;
160                         }
161                 }
162         }
163         return world;
164 }
165
166 //float ctf_clientcommand();
167 void SV_ParseClientCommand(string s) {
168         local string cmd;
169         local float i;
170
171         tokenize(s);
172
173         if(GameCommand_Vote(s, self)) {
174                 return;
175         } else if(GameCommand_MapVote(argv(0))) {
176                 return;
177         } else if(argv(0) == "autoswitch") {
178                 // be backwards compatible with older clients (enabled)
179                 self.autoswitch = ("0" != argv(1));
180                 local string autoswitchmsg;
181                 if (self.autoswitch) {
182                         autoswitchmsg = "on";
183                 } else {
184                         autoswitchmsg = "off";
185                 }
186                 sprint(self, strcat("^1autoswitch turned ", autoswitchmsg, "\n"));
187         } else if(argv(0) == "clientversion") {
188                 if not(self.flags & FL_CLIENT)
189                         return;
190                 if (argv(1) == "$gameversion") {
191                         //versionmsg = "^1client is too old to get versioninfo.\nUPDATE!!! (http://www.nexuiz.com)^8";
192                         // either that or someone wants to be funny
193                         self.version = 1;
194                 } else {
195                         self.version = stof(argv(1));
196                 }
197                 if(self.version != cvar("gameversion"))
198                 {
199                         self.classname = "observer";
200                         self.version_mismatch = 1;
201                         PutClientInServer();
202                 } else if(cvar("g_campaign") || cvar("g_balance_teams") || cvar("g_balance_teams_force")) {
203                         //JoinBestTeam(self, FALSE, TRUE);
204                 } else if(cvar("teamplay") && !cvar("sv_spectate")) {
205                         self.classname = "observer";
206                         stuffcmd(self,"menu_showteamselect\n");
207                 }
208         } else if(argv(0) == "reportcvar") { // old system
209                 GetCvars(1);
210         } else if(argv(0) == "sentcvar") { // new system
211                 GetCvars(1);
212         } else if(argv(0) == "spectate") {
213                 if not(self.flags & FL_CLIENT)
214                         return;
215                 if(g_lms || g_arena)
216                         return; // don't allow spectating in lms, unless player runs out of lives
217                 if(self.classname == "player" && cvar("sv_spectate") == 1) {
218                         if(self.flagcarried)
219                                 DropFlag(self.flagcarried, 0);
220                         kh_Key_DropAll(self, TRUE);
221                         WaypointSprite_PlayerDead();
222                         self.classname = "observer";
223                         if(blockSpectators)
224                                 sprint(self, strcat("^7You have to become a player within the next ", ftos(cvar("g_maxplayers_spectator_blocktime")), " seconds, otherwise you will be kicked, because spectators aren't allowed at this time!\n"));
225                         PutClientInServer();
226                 }
227         } else if(argv(0) == "join") {
228                 if not(self.flags & FL_CLIENT)
229                         return;
230                 if(!g_arena)
231                 if (self.classname != "player" && !lockteams)
232                 {
233                         if(isJoinAllowed()) {
234                                 self.classname = "player";
235                                 PlayerScore_Clear(self);
236                                 bprint ("^4", self.netname, "^4 is playing now\n");
237                                 PutClientInServer();
238                         }
239                         else {
240                                 //player may not join because of g_maxplayers is set
241                                 centerprint_atprio(self, CENTERPRIO_MAPVOTE, PREVENT_JOIN_TEXT);
242                         }
243                 }
244         } else if( argv(0) == "selectteam" ) {
245                 if not(self.flags & FL_CLIENT)
246                         return;
247                 if( !cvar("teamplay") ) {
248                         sprint( self, "selecteam can only be used in teamgames\n");
249                 } else if(cvar("g_campaign")) {
250                         //JoinBestTeam(self, 0);
251                 } else if(lockteams) {
252                         sprint( self, "^7The game has already begun, you must wait until the next map to be able to join a team.\n");
253                 } else if( argv(1) == "red" ) {
254                         DoTeamChange(COLOR_TEAM1);
255                 } else if( argv(1) == "blue" ) {
256                         DoTeamChange(COLOR_TEAM2);
257                 } else if( argv(1) == "yellow" ) {
258                         DoTeamChange(COLOR_TEAM3);
259                 } else if( argv(1) == "pink" ) {
260                         DoTeamChange(COLOR_TEAM4);
261                 } else if( argv(1) == "auto" ) {
262                         DoTeamChange(-1);
263                 } else {
264                         sprint( self, strcat( "selectteam none/red/blue/yellow/pink/auto - \"", argv(1), "\" not recognised\n" ) );
265                 }
266         } else if(argv(0) == "ready") {
267                 if not(self.flags & FL_CLIENT)
268                         return;
269                 if((inWarmupStage && 0 < g_warmup_limit) // with unlimited warmup players have to be able to restart
270                    || cvar("sv_ready_restart"))
271                 {
272                         if(timeoutStatus) {
273                                 return sprint(self, "^1You cannot reset the game while a timeout is active!\n");
274                         }
275                         
276                         if(!restart_countdown || cvar("sv_ready_restart_repeatable"))
277                         {
278                                 self.ready = TRUE;
279                                 bprint(self.netname, "^2 is ready\n");
280                                 ReadyCount();
281                         } else {
282                                 sprint(self, "^1game has already been restarted\n");
283                         }
284                 }
285         } else if(argv(0) == "maplist") {
286                 local float n, j;
287                 local string col;
288                 n = tokenize(cvar_string("g_maplist"));
289                 sprint(self, "^7Maps in list: ");
290                 for(i = 0, j = 0; i < n; ++i)
291                 {
292                         if(MapInfo_CheckMap(argv(i)))
293                         {
294                                 if(mod(j, 2))
295                                         col = "^2";
296                                 else
297                                         col = "^3";
298                                 sprint(self, strcat(col, argv(i), " "));
299                                 ++j;
300                         }
301                 }
302                 sprint(self, "\n");
303         } else if(argv(0) == "lsmaps") {
304                 sprint(self, "^7Maps available: ");
305                 for(i = 0; i < MapInfo_count; ++i)
306                 {
307                         if(mod(i, 2))
308                                 col = "^2";
309                         else
310                                 col = "^3";
311                         sprint(self, strcat(col, MapInfo_BSPName_ByID(i), " "));
312                 }
313                 sprint(self, "\n");
314         } else if(argv(0) == "voice") {
315                 VoiceMessage(argv(1));
316         } else if(argv(0) == "say") {
317                 Say(self, FALSE, substring(s, 4, strlen(s) - 4));
318                 //clientcommand(self, formatmessage(s));
319         } else if(argv(0) == "say_team") {
320                 Say(self, TRUE, substring(s, 9, strlen(s) - 9));
321                 //clientcommand(self, formatmessage(s));
322         } else if(argv(0) == "info") {
323                 cmd = cvar_string(strcat("sv_info_", argv(1)));
324                 if(cmd == "")
325                         sprint(self, "ERROR: unsupported info command\n");
326                 else
327                         wordwrap_sprint(cmd, 1111);
328         } else if(argv(0) == "suggestmap") {
329                 sprint(self, strcat(MapVote_Suggest(argv(1)), "\n"));
330         } else if(argv(0) == "calltimeout") {
331                 if not(self.flags & FL_CLIENT)
332                         return;
333                 if(cvar("sv_timeout")) {
334                         if(self.classname == "player") {
335                                 if(votecalled)
336                                         sprint(self, "^7Error: you can not call a timeout while a vote is active!\n");
337                                 else
338                                         evaluateTimeoutCall();
339                         }
340                         else
341                                 sprint(self, "^7Error: only players can call a timeout!\n");
342                 }
343         } else if(argv(0) == "resumegame") {
344                 if not(self.flags & FL_CLIENT)
345                         return;
346                 if(cvar("sv_timeout")) {
347                         evaluateResumeGame();
348                 }
349         } else if(argv(0) == "teamstatus") {
350                 Score_NicePrint(self);
351         } else {
352                 //if(ctf_clientcommand())
353                 //      return;
354                 cmd = argv(0);
355                 /* checks not needed any more since DP has separated clientcommands and regular commands
356                 if(cmd != "status")
357                 if(cmd != "name")
358                 //if(cmd != "say") // handled above
359                 //if(cmd != "say_team") // handled above
360                 if(cmd != "tell")
361                 if(cmd != "color")
362                 if(cmd != "kill")
363                 if(cmd != "pause")
364                 if(cmd != "kick")
365                 if(cmd != "ping")
366                 if(cmd != "pings")
367                 if(cmd != "ban")
368                 if(cmd != "pmodel")
369                 if(cmd != "rate")
370                 if(cmd != "playermodel")
371                 if(cmd != "playerskin")
372                 if(cmd != "god") if(cmd != "notarget") if(cmd != "fly") if(cmd != "give") if(cmd != "noclip")
373                 {
374                         print("WARNING: Invalid clientcommand by ", self.netname, ": ", s, "\n");
375                         return;
376                 }
377                 */
378                 clientcommand(self,s);
379         }
380 }
381
382 void ReadyRestart()
383 {
384         local entity e;
385
386         bprint("^1Server is restarting...\n");
387
388         VoteReset();
389
390         // no arena, assault support yet...
391         if(g_arena | g_assault | gameover | intermission_running | race_completing)
392                 localcmd("restart\n");
393
394         // clear overtime
395         if(checkrules_overtimeend)
396                 checkrules_overtimeend = 0;
397
398         if(readyNagActive) { //if every player is ready, remove the ready-nagger again
399                 readyNagActive = 0;
400                 remove(readyNagger);
401         }
402
403         restart_countdown = time + RESTART_COUNTDOWN;
404         restart_mapalreadyrestarted = 0; //reset this var, needed when cvar sv_ready_restart_repeatable is in use
405         if(0 < cvar("timelimit") || inWarmupStage)
406         {
407                 // remember original timelimit on first restart
408                 if(!timelimit_orig)
409                         timelimit_orig = cvar("timelimit");
410                 //only set the new timelimit if, when loading the map, a timelimit was really set
411                 if(timelimit_orig)
412                         cvar_set("timelimit", ftos(timelimit_orig + ceil(restart_countdown)/60));
413         }
414
415         inWarmupStage = 0; //once the game is restarted the game is in match stage
416
417         //reset the .ready status of all players (also spectators)
418         FOR_EACH_CLIENTSLOT(e)
419                 e.ready = 0;
420         FOR_EACH_REALCLIENT(e)
421         {
422                 msg_entity = e;
423                 WriteByte(MSG_ONE, SVC_TEMPENTITY);
424                 WriteByte(MSG_ONE, TE_CSQC_WARMUP);
425                 WriteByte(MSG_ONE, 0);
426         }
427
428         if(cvar("teamplay_lockonrestart") && teams_matter) {
429                 lockteams = 1;
430                 bprint("^1The teams are now locked.\n");
431         }
432         
433         //initiate the restart-countdown-announcer entity
434         restartAnnouncer = spawn();
435         restartAnnouncer.think = restartAnnouncer_Think;
436         restartAnnouncer.nextthink = time;
437         restartAnnouncer.cnt = RESTART_COUNTDOWN;
438         
439         //after a restart every players number of allowed timeouts gets reset, too
440         if(cvar("sv_timeout"))
441         {
442                 FOR_EACH_REALPLAYER(e)
443                         e.allowedTimeouts = cvar("sv_timeout_number");
444         }
445
446         //play the prepareforbattle sound to everyone
447         play2all("announcer/robotic/prepareforbattle.wav");
448
449         //reset map immediately if this cvar is not set
450         if (!cvar("sv_ready_restart_after_countdown"))
451                 reset_map();
452
453         // reset ALL scores
454         Score_ClearAll();
455         
456         if(cvar("sv_eventlog"))
457                 GameLogEcho(":restart");
458 }
459
460 /**
461  * Counts how many players are ready. If not enough players are ready, the function
462  * does nothing. If all players are ready, the timelimit will be extended and the
463  * restart_countdown variable is set to allow other functions like PlayerPostThink
464  * to detect that the countdown is now active. If the cvar sv_ready_restart_after_countdown
465  * is not set the map will be resetted.
466  * 
467  * Function is called after the server receives a 'ready' sign from a player.
468  */
469 void ReadyCount()
470 {
471         local entity e;
472         local float r, p;
473
474         r = p = 0;
475
476         FOR_EACH_REALPLAYER(e)
477         {
478                 p += 1;
479                 if(e.ready)
480                         r += 1;
481         }
482
483         if(!r)
484                 return; // NOTE: this also excludes !p, as r <= p
485
486         if(cvar("sv_ready_restart_nag")) {
487                 if(!readyNagActive) {
488                         readyNagger = spawn();
489                         readyNagger.think = readyNagger_Think;
490                         readyNagger.cnt = cvar("sv_ready_restart_nag_duration");
491                         readyNagger.nextthink = time;
492                         readyNagActive = 1;
493                 }
494         }
495
496         if(r < p)
497                 return;
498         
499         ReadyRestart();
500 }
501
502 /**
503  * Centerprints the information to all players who didn't ready up yet to do so.
504  */
505 void readyNagger_Think() {
506         local entity plr;
507         if(self.cnt <= 0) { //have a break showing the ready nag
508                 //make sure that the old ready-nag-centerprint isn't shown too long:
509                 FOR_EACH_REALCLIENT(plr) {
510                         if(plr.classname == "player") {
511                                 if (!plr.ready)
512                                         centerprint_atprio(plr, CENTERPRIO_SPAM, "");
513                         }
514                 }
515                 self.cnt = cvar("sv_ready_restart_nag_duration");
516                 self.nextthink = time + cvar("sv_ready_restart_nag_interval");
517         }
518         else {
519                 //show the ready nagging to all players who aren't ready yet
520                 FOR_EACH_REALCLIENT(plr) {
521                         if(plr.classname == "player") {
522                                 if (!plr.ready) {
523                                         centerprint_atprio(plr, CENTERPRIO_SPAM, "^2Please ready up (F4 by default)!");
524                                         //play reminder sound once the centerprint appears for the first time after the pause:
525                                         if (self.cnt == cvar("sv_ready_restart_nag_duration"))
526                                                 play2(plr, "misc/talk2.wav");
527                                 }
528                         }
529                 }
530
531                 self.nextthink = time + 1;
532                 self.cnt -= 1;
533         }
534 }
535
536 /**
537  * Shows the restart countdown for all players.
538  * Plays the countdown sounds for the seconds 3, 2 1, begin for everyone.
539  * Restarts the map after the countdown is over (and cvar sv_ready_restart_after_countdown
540  * is set to 1).
541  */
542 void restartAnnouncer_Think() {
543         local entity plr;
544         local string s;
545         if(self.cnt <= 0) { //show the "Begin" message and
546                 if (cvar("sv_ready_restart_after_countdown")) {
547                         restart_mapalreadyrestarted = 1;
548                         reset_map();
549                 }
550
551                 FOR_EACH_REALCLIENT(plr) {
552                         if(plr.classname == "player") {
553                                 s = strcat(NEWLINES, "^1Begin!");
554                                 centerprint(plr, s);
555                         }
556                 }
557                 play2all("announcer/robotic/begin.wav");
558
559                 remove(self);
560                 return;
561         }
562         else {
563                 FOR_EACH_REALCLIENT(plr) {
564                         if(plr.classname == "player") {
565                                 s = strcat(NEWLINES, "^1Game starts in ", ftos(self.cnt), " seconds");
566                                 centerprint(plr, s);
567                         }
568                 }
569
570                 if(self.cnt <= 3) {
571                         play2all(strcat("announcer/robotic/", ftos(self.cnt), ".ogg"));
572                 }
573                 self.nextthink = time + 1;
574                 self.cnt -= 1;
575         }
576 }
577
578 /**
579  * Checks whether the player who calls the timeout is allowed to do so.
580  * If so, it initializes the timeout countdown. It also checks whether another
581  * timeout was already running at this time and reacts correspondingly.
582  *
583  * affected globals/fields: .allowedTimeouts, remainingTimeoutTime, remainingLeadTime,
584  *                          timeoutInitiator, timeoutStatus, timeoutHandler
585  *
586  * This function is called when a player issues the calltimeout command.
587  */
588 void evaluateTimeoutCall() {
589         if (inWarmupStage && !g_warmup_allow_timeout)
590                 return sprint(self, "^7Error: You can not call a timeout in warmup-stage!\n");
591         if (time < restart_countdown )
592                 return sprint(self, "^7Error: You can not call a timeout while the map is being restarted!\n");
593         if (timeoutStatus != 2) {
594                 //if the map uses a timelimit make sure that timeout cannot be called right before the map ends
595                 if (cvar("timelimit")) {
596                         //a timelimit was used
597                         local float myTl;
598                         if (cvar("timelimit"))
599                                 myTl = cvar("timelimit");
600                         else
601                                 myTl = timelimit_orig;
602
603                         local float lastPossibleTimeout;
604                         lastPossibleTimeout = (myTl*60) - cvar("sv_timeout_leadtime") - 1;
605
606                         if (lastPossibleTimeout < time)
607                                 return sprint(self, "^7Error: It is too late to call a timeout now!\n");
608                 }
609         }
610         //player may not call a timeout if he has no calls left
611         if (self.allowedTimeouts < 1)
612                 return sprint(self, "^7Error: You already used all your timeout calls for this map!\n");
613         //now all required checks are passed
614         self.allowedTimeouts -= 1;
615         bprint(self.netname, " ^7called a timeout (", ftos(self.allowedTimeouts), " timeouts left)!\n"); //write a bprint who started the timeout (and how many he has left)
616         remainingTimeoutTime = cvar("sv_timeout_length");
617         remainingLeadTime = cvar("sv_timeout_leadtime");
618         timeoutInitiator = self;
619         if (timeoutStatus == 0) { //if another timeout was already active, don't change its status (which was 1 or 2) to 1, only change it to 1 if no timeout was active yet
620                 timeoutStatus = 1;
621                 //create the timeout indicator which centerprints the information to all players and takes care of pausing/unpausing
622                 timeoutHandler = spawn();
623                 timeoutHandler.think = timeoutHandler_Think;
624         }
625         timeoutHandler.nextthink = time; //always let the entity think asap
626
627         //inform all connected clients about the timeout call
628         play2all("announcer/robotic/timeoutcalled.wav");
629 }
630
631 /**
632  * Checks whether a player is allowed to resume the game. If he is allowed to do it,
633  * and the lead time for the timeout is still active, this countdown just will be aborted (the
634  * game will never be paused). Otherwise the remainingTimeoutTime will be set to the corresponding
635  * value of the cvar sv_timeout_resumetime.
636  *
637  * This function is called when a player issues the resumegame command.
638  */
639 void evaluateResumeGame() {
640         if (!timeoutStatus)
641                 return sprint(self, "^7Error: There is no active timeout which could be aborted!\n");
642         if (self != timeoutInitiator)
643                 return sprint(self, "^7Error: You may not abort the active timeout. Only the player who called it can do that!\n");
644         if (timeoutStatus == 1) {
645                 remainingTimeoutTime = timeoutStatus = 0;
646                 timeoutHandler.nextthink = time; //timeoutHandler has to take care of it immediately
647                 bprint(strcat("^7The timeout was aborted by ", self.netname, " !\n"));
648         }
649         else if (timeoutStatus == 2) {
650                 //only shorten the remainingTimeoutTime if it makes sense
651                 if( remainingTimeoutTime > (cvar("sv_timeout_resumetime") + 1) ) {
652                         bprint(strcat("^1Attention: ^7", self.netname, " resumed the game! Prepare for battle!\n"));
653                         remainingTimeoutTime = cvar("sv_timeout_resumetime");
654                         timeoutHandler.nextthink = time; //timeoutHandler has to take care of it immediately
655                 }
656                 else
657                         sprint(self, "^7Error: Your resumegame call was discarded!\n");
658
659         }
660 }