]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/server/clientcommands.qc
Merge remote branch 'origin/terencehill/ons_cp_animation_stuff'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / clientcommands.qc
1 entity nagger;
2 float readycount;
3
4 float Nagger_SendEntity(entity to, float sendflags)
5 {
6         float nags, i, f, b;
7         entity e;
8         WriteByte(MSG_ENTITY, ENT_CLIENT_NAGGER);
9
10         // bits:
11         //   1 = ready
12         //   2 = player needs to ready up
13         //   4 = vote
14         //   8 = player needs to vote
15         //  16 = warmup
16         // sendflags:
17         //  64 = vote counts
18         // 128 = vote string
19
20         nags = 0;
21         if(readycount)
22         {
23                 nags |= 1;
24                 if(to.ready == 0)
25                         nags |= 2;
26         }
27         if(votecalled)
28         {
29                 nags |= 4;
30                 if(to.vote_vote == 0)
31                         nags |= 8;
32         }
33         if(inWarmupStage)
34                 nags |= 16;
35
36         if(sendflags & 64)
37                 nags |= 64;
38
39         if(sendflags & 128)
40                 nags |= 128;
41
42         if(!(nags & 4)) // no vote called? send no string
43                 nags &~= (64 | 128);
44
45         WriteByte(MSG_ENTITY, nags);
46
47         if(nags & 64)
48         {
49                 WriteByte(MSG_ENTITY, vote_yescount);
50                 WriteByte(MSG_ENTITY, vote_nocount);
51                 WriteByte(MSG_ENTITY, vote_needed_absolute);
52                 WriteChar(MSG_ENTITY, to.vote_vote);
53         }
54
55         if(nags & 128)
56                 WriteString(MSG_ENTITY, votecalledvote_display);
57
58         if(nags & 1)
59         {
60                 for(i = 1; i <= maxclients; i += 8)
61                 {
62                         for(f = 0, e = edict_num(i), b = 1; b < 256; b *= 2, e = nextent(e))
63                                 if(clienttype(e) != CLIENTTYPE_REAL || e.ready)
64                                         f |= b;
65                         WriteByte(MSG_ENTITY, f);
66                 }
67         }
68
69         return TRUE;
70 }
71 void Nagger_Init()
72 {
73         Net_LinkEntity(nagger = spawn(), FALSE, 0, Nagger_SendEntity);
74 }
75 void Nagger_VoteChanged()
76 {
77         if(nagger)
78                 nagger.SendFlags |= 128;
79 }
80 void Nagger_VoteCountChanged()
81 {
82         if(nagger)
83                 nagger.SendFlags |= 64;
84 }
85 void Nagger_ReadyCounted()
86 {
87         if(nagger)
88                 nagger.SendFlags |= 1;
89 }
90
91 void ReadyCount();
92 string MapVote_Suggest(string m);
93
94 entity GetPlayer(string name)
95 {
96         float num;
97         entity e;
98         string ns;
99
100         if(substring(name, 0, 1) == "#") {
101                 num = stof(substring(name, 1, 999));
102                 if(num >= 1 && num <= maxclients) {
103                         for((e = world); num > 0; --num, (e = nextent(e)))
104                                 ;
105                         //if(clienttype(e) == CLIENTTYPE_REAL)
106                         if(e.classname == "player")
107                                 return e;
108                 }
109         } else {
110                 ns = strdecolorize(name);
111                 FOR_EACH_REALPLAYER(e) {
112                         if(!strcasecmp(strdecolorize(e.netname), ns)) {
113                                 return e;
114                         }
115                 }
116         }
117         return world;
118 }
119
120 //float ctf_clientcommand();
121 float readyrestart_happened;
122 .float lms_spectate_warning;
123 void spawnfunc_func_breakable();
124
125 .float cmd_floodtime;
126 .float cmd_floodcount;
127 float cmd_floodcheck()
128 {
129         if (timeoutStatus != 2)
130         {
131                 if(time == self.cmd_floodtime)
132                 {
133                         self.cmd_floodcount += 1;
134                         if(self.cmd_floodcount > 8)
135                                 return TRUE;
136                 }
137                 else
138                 {
139                         self.cmd_floodtime = time;
140                         self.cmd_floodcount = 1;
141                 }
142         }
143         return FALSE;
144 }
145
146 .float checkfail;
147 void SV_ParseClientCommand(string s) {
148         string cmd;
149         float tokens;
150         float i;
151         entity e;
152
153         tokens = tokenize_console(s);
154
155         cmd = strtolower(argv(0));
156         if(cmd != "reportcvar")
157         if(cmd != "sentcvar")
158         if(cmd != "pause")
159         if(cmd != "prespawn")
160         if(cmd != "spawn")
161         if(cmd != "begin")
162         {
163                 if(cmd_floodcheck())
164                         return;
165         }
166
167         if(GameCommand_Vote(s, self)) {
168                 return;
169         } else if(GameCommand_MapVote(argv(0))) {
170                 return;
171         } else if(cmd == "checkfail") {
172                 print(sprintf("CHECKFAIL: %s (%s) epically failed check %s\n", self.netname, self.netaddress, substring(s, argv_start_index(1), argv_end_index(-1) - argv_start_index(1))));
173                 self.checkfail = 1;
174         } else if(cmd == "autoswitch") {
175                 // be backwards compatible with older clients (enabled)
176                 self.autoswitch = ("0" != argv(1));
177                 local string autoswitchmsg;
178                 if (self.autoswitch) {
179                         autoswitchmsg = "on";
180                 } else {
181                         autoswitchmsg = "off";
182                 }
183                 sprint(self, strcat("^1autoswitch turned ", autoswitchmsg, "\n"));
184         } else if(cmd == "clientversion") {
185                 if not(self.flags & FL_CLIENT)
186                         return;
187                 if (argv(1) == "$gameversion") {
188                         //versionmsg = "^1client is too old to get versioninfo.\nUPDATE!!! (http://www.xonotic.com)^8";
189                         // either that or someone wants to be funny
190                         self.version = 1;
191                 } else {
192                         self.version = stof(argv(1));
193                 }
194                 if(self.version < autocvar_gameversion_min || self.version > autocvar_gameversion_max)
195                 {
196                         self.version_mismatch = 1;
197                         ClientKill_TeamChange(-2); // observe
198                 } else if(autocvar_g_campaign || autocvar_g_balance_teams || autocvar_g_balance_teams_force) {
199                         //JoinBestTeam(self, FALSE, TRUE);
200                 } else if(teamplay && !autocvar_sv_spectate && !(self.team_forced > 0)) {
201                         self.classname = "observer";
202                         stuffcmd(self,"menu_showteamselect\n");
203                 }
204         } else if(cmd == "reportcvar") { // old system
205                 if(substring(argv(2), 0, 1) == "$") // undefined cvar: use the default value on the server then
206                 {
207                         s = strcat(substring(s, argv_start_index(0), argv_end_index(1) - argv_start_index(0)), " \"", cvar_defstring(argv(1)), "\"");
208                         tokens = tokenize_console(s);
209                 }
210                 GetCvars(1);
211         } else if(cmd == "sentcvar") { // new system
212                 if(tokens == 2) // undefined cvar: use the default value on the server then
213                 {
214                         s = strcat(substring(s, argv_start_index(0), argv_end_index(1) - argv_start_index(0)), " \"", cvar_defstring(argv(1)), "\"");
215                         tokens = tokenize_console(s);
216                 }
217                 GetCvars(1);
218         } else if(cmd == "spectate") {
219                 if(cmd_floodcheck())
220                         return;
221                 if not(self.flags & FL_CLIENT)
222                         return;
223                 if(g_arena)
224                         return;
225                 if(g_lms)
226                 {
227                         if(self.lms_spectate_warning)
228                         {
229                                 // mark player as spectator
230                                 PlayerScore_Add(self, SP_LMS_RANK, 666 - PlayerScore_Add(self, SP_LMS_RANK, 0));
231                         }
232                         else
233                         {
234                                 self.lms_spectate_warning = 1;
235                                 sprint(self, "WARNING: you won't be able to enter the game again after spectating in LMS. Use the same command again to spectate anyway.\n");
236                                 return;
237                         }
238                 }
239                 if(self.classname == "player" && autocvar_sv_spectate == 1) {
240                         ClientKill_TeamChange(-2); // observe
241                 }
242                 if(g_ca && self.caplayer && (self.classname == "spectator" || self.classname == "observer")) {
243                         // in CA, allow a dead player to move to spectatators (without that, caplayer!=0 will be moved back to the player list)
244                         sprint(self, "WARNING: you will spectate in the next round.\n");
245                         self.caplayer = 0;
246                 }
247         } else if(cmd == "join") {
248                 if not(self.flags & FL_CLIENT)
249                         return;
250                 if(!g_arena)
251                 if (self.classname != "player" && !lockteams)
252                 {
253                         if(nJoinAllowed(1)) {
254                                 self.classname = "player";
255                                 if(g_ca)
256                                         self.caplayer = 1;
257                                 PlayerScore_Clear(self);
258                                 bprint ("^4", self.netname, "^4 is playing now\n");
259                                 PutClientInServer();
260                                 if(autocvar_g_campaign)
261                                         campaign_bots_may_start = 1;
262                         }
263                         else {
264                                 //player may not join because of g_maxplayers is set
265                                 centerprint_atprio(self, CENTERPRIO_MAPVOTE, PREVENT_JOIN_TEXT);
266                         }
267                 }
268         } else if( cmd == "selectteam" ) {
269                 if not(self.flags & FL_CLIENT)
270                         return;
271                 if( !teamplay ) {
272                         sprint( self, "selectteam can only be used in teamgames\n");
273                 } else if(autocvar_g_campaign) {
274                         //JoinBestTeam(self, 0);
275                 } else if(self.team_forced > 0) {
276                         sprint( self, "selectteam can not be used as your team is forced\n");
277                 } else if(lockteams) {
278                         sprint( self, "^7The game has already begun, you must wait until the next map to be able to join a team.\n");
279                 } else if( argv(1) == "red" ) {
280                         ClientKill_TeamChange(COLOR_TEAM1);
281                 } else if( argv(1) == "blue" ) {
282                         ClientKill_TeamChange(COLOR_TEAM2);
283                 } else if( argv(1) == "yellow" ) {
284                         ClientKill_TeamChange(COLOR_TEAM3);
285                 } else if( argv(1) == "pink" ) {
286                         ClientKill_TeamChange(COLOR_TEAM4);
287                 } else if( argv(1) == "auto" ) {
288                         ClientKill_TeamChange(-1);
289                 } else {
290                         sprint( self, strcat( "selectteam none/red/blue/yellow/pink/auto - \"", argv(1), "\" not recognised\n" ) );
291                 }
292         } else if(cmd == "ready") {
293                 if not(self.flags & FL_CLIENT)
294                         return;
295
296                 if((inWarmupStage)
297                    || autocvar_sv_ready_restart || g_race_qualifying == 2)
298                 {
299                         if(!readyrestart_happened || autocvar_sv_ready_restart_repeatable)
300                         {
301                                 if (self.ready) // toggle
302                                 {
303                                         self.ready = FALSE;
304                                         bprint(self.netname, "^2 is ^1NOT^2 ready\n");
305                                 }
306                                 else
307                                 {
308                                         self.ready = TRUE;
309                                         bprint(self.netname, "^2 is ready\n");
310                                 }
311
312                                 // cannot reset the game while a timeout is active!
313                                 if(!timeoutStatus)
314                                         ReadyCount();
315                         } else {
316                                 sprint(self, "^1Game has already been restarted\n");
317                         }
318                 }
319         } else if(cmd == "maplist") {
320                 sprint(self, maplist_reply);
321         } else if(cmd == "lsmaps") {
322                 sprint(self, lsmaps_reply);
323         } else if(cmd == "lsnewmaps") {
324                 sprint(self, lsnewmaps_reply);
325         } else if(cmd == "records") {
326                 for(i = 0; i < 10; ++i)
327                         sprint(self, records_reply[i]);
328         } else if(cmd == "ladder") {
329                 sprint(self, ladder_reply);
330         } else if(cmd == "rankings") {
331                 sprint(self, rankings_reply);
332         } else if(cmd == "voice") {
333                 if(tokens >= 3)
334                         VoiceMessage(argv(1), substring(s, argv_start_index(2), argv_end_index(-1) - argv_start_index(2)));
335                 else
336                         VoiceMessage(argv(1), "");
337         } else if(cmd == "say") {
338                 if(tokens >= 2)
339                         Say(self, FALSE, world, substring(s, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), 1);
340                 //clientcommand(self, formatmessage(s));
341         } else if(cmd == "say_team") {
342                 if(tokens >= 2)
343                         Say(self, TRUE, world, substring(s, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), 1);
344                 //clientcommand(self, formatmessage(s));
345         } else if(cmd == "tell") {
346                 e = GetCommandPlayerSlotTargetFromTokenizedCommand(tokens, 1);
347                 if(e && tokens > ParseCommandPlayerSlotTarget_firsttoken)
348                 {
349                         Say(self, FALSE, e, substring(s, argv_start_index(ParseCommandPlayerSlotTarget_firsttoken), argv_end_index(-1) - argv_start_index(ParseCommandPlayerSlotTarget_firsttoken)), TRUE);
350                 }
351                 else
352                 {
353                         if(tokens > ParseCommandPlayerSlotTarget_firsttoken)
354                                 trigger_magicear_processmessage_forallears(self, -1, world, substring(s, argv_start_index(ParseCommandPlayerSlotTarget_firsttoken), argv_end_index(-1) - argv_start_index(ParseCommandPlayerSlotTarget_firsttoken)));
355                         sprint(self, "ERROR: usage: tell # playerid text...\n");
356                 }
357                 //clientcommand(self, formatmessage(s));
358         } else if(cmd == "info") {
359                 cmd = cvar_string_builtin(strcat("sv_info_", argv(1))); // This needed fixed for the cvar check
360                 if(cmd == "")
361                         sprint(self, "ERROR: unsupported info command\n");
362                 else
363                         wordwrap_sprint(cmd, 1111);
364         } else if(cmd == "suggestmap") {
365                 sprint(self, strcat(MapVote_Suggest(argv(1)), "\n"));
366         } else if(cmd == "timeout") {
367                 if not(self.flags & FL_CLIENT)
368                         return;
369                 if(autocvar_sv_timeout) {
370                         if(self.classname == "player") {
371                                 if(votecalled)
372                                         sprint(self, "^7Error: you can not call a timeout while a vote is active!\n");
373                                 else
374                                         evaluateTimeout();
375                         }
376                         else
377                                 sprint(self, "^7Error: only players can call a timeout!\n");
378                 }
379         } else if(cmd == "timein") {
380                 if not(self.flags & FL_CLIENT)
381                         return;
382                 if(autocvar_sv_timeout) {
383                         evaluateTimein();
384                 }
385         } else if(cmd == "teamstatus") {
386                 Score_NicePrint(self);
387         } else if(cmd == "cvar_changes") {
388                 sprint(self, cvar_changes);
389         } else if(cmd == "cvar_purechanges") {
390                 sprint(self, cvar_purechanges);
391         } else if(CheatCommand(tokens)) {
392         } else {
393 #if 0
394                 //if(ctf_clientcommand())
395                 //      return;
396                 // grep for Cmd_AddCommand_WithClientCommand to find them all
397                 if(cmd != "status")
398                 //if(cmd != "say") // handled above
399                 //if(cmd != "say_team") // handled above
400                 if(cmd != "kill")
401                 if(cmd != "pause")
402                 if(cmd != "ping")
403                 if(cmd != "name")
404                 if(cmd != "color")
405                 if(cmd != "rate")
406                 if(cmd != "pmodel")
407                 if(cmd != "playermodel")
408                 if(cmd != "playerskin")
409                 if(cmd != "prespawn")
410                 if(cmd != "spawn")
411                 if(cmd != "begin")
412                 if(cmd != "pings")
413                 if(cmd != "sv_startdownload")
414                 if(cmd != "download")
415                 {
416                         print("WARNING: Invalid clientcommand by ", self.netname, ": ", s, "\n");
417                         return;
418                 }
419 #endif
420
421                 if(self.jointime > 0 && time > self.jointime + 10 && time > self.nickspamtime) // allow any changes in the first 10 seconds since joining
422                 if(cmd == "name" || cmd == "playermodel") // TODO also playerskin and color?
423                 {
424                         if(self.nickspamtime == 0 || time > self.nickspamtime + autocvar_g_nick_flood_timeout)
425                                 // good, no serious flood
426                                 self.nickspamcount = 1;
427                         else
428                                 self.nickspamcount += 1;
429                         self.nickspamtime = time + autocvar_g_nick_flood_penalty;
430
431                         if (timeoutStatus == 2) //when game is paused, no flood protection
432                                 self.nickspamcount = self.nickspamtime = 0;
433                 }
434
435                 clientcommand(self,s);
436         }
437 }
438
439 void ReadyRestartForce()
440 {
441         local entity e;
442
443         bprint("^1Server is restarting...\n");
444
445         VoteReset();
446
447         // clear overtime
448         if (checkrules_overtimesadded > 0 && g_race_qualifying != 2) {
449                 //we have to decrease timelimit to its original value again!!
450                 float newTL;
451                 newTL = autocvar_timelimit;
452                 newTL -= checkrules_overtimesadded * autocvar_timelimit_overtime;
453                 cvar_set("timelimit", ftos(newTL));
454         }
455
456         checkrules_suddendeathend = checkrules_overtimesadded = checkrules_suddendeathwarning = 0;
457
458
459         readyrestart_happened = 1;
460         game_starttime = time;
461         if(!g_ca && !g_arena)
462                 game_starttime += RESTART_COUNTDOWN;
463         restart_mapalreadyrestarted = 0; //reset this var, needed when cvar sv_ready_restart_repeatable is in use
464
465         inWarmupStage = 0; //once the game is restarted the game is in match stage
466
467         //reset the .ready status of all players (also spectators)
468         FOR_EACH_CLIENTSLOT(e)
469                 e.ready = 0;
470         readycount = 0;
471         Nagger_ReadyCounted(); // NOTE: this causes a resend of that entity, and will also turn off warmup state on the client
472
473         if(autocvar_teamplay_lockonrestart && teamplay) {
474                 lockteams = 1;
475                 bprint("^1The teams are now locked.\n");
476         }
477
478         //initiate the restart-countdown-announcer entity
479         if(autocvar_sv_ready_restart_after_countdown && !g_ca && !g_arena)
480         {
481                 restartTimer = spawn();
482                 restartTimer.think = restartTimer_Think;
483                 restartTimer.nextthink = game_starttime;
484         }
485
486         //after a restart every players number of allowed timeouts gets reset, too
487         if(autocvar_sv_timeout)
488         {
489                 FOR_EACH_REALPLAYER(e)
490                         e.allowedTimeouts = autocvar_sv_timeout_number;
491         }
492
493         //reset map immediately if this cvar is not set
494         if (!autocvar_sv_ready_restart_after_countdown)
495                 reset_map(TRUE);
496
497         if(autocvar_sv_eventlog)
498                 GameLogEcho(":restart");
499 }
500
501 void ReadyRestart()
502 {
503         // no arena, assault support yet...
504         if(g_arena | g_assault | gameover | intermission_running | race_completing)
505                 localcmd("restart\n");
506         else
507                 localcmd("\nsv_hook_gamerestart\n");
508
509         ReadyRestartForce();
510
511         // reset ALL scores, but only do that at the beginning
512         //of the countdown if sv_ready_restart_after_countdown is off!
513         //Otherwise scores could be manipulated during the countdown!
514         if (!autocvar_sv_ready_restart_after_countdown)
515                 Score_ClearAll();
516 }
517
518 /**
519  * Counts how many players are ready. If not enough players are ready, the function
520  * does nothing. If all players are ready, the timelimit will be extended and the
521  * restart_countdown variable is set to allow other functions like PlayerPostThink
522  * to detect that the countdown is now active. If the cvar sv_ready_restart_after_countdown
523  * is not set the map will be resetted.
524  *
525  * Function is called after the server receives a 'ready' sign from a player.
526  */
527 void ReadyCount()
528 {
529         local entity e;
530         local float r, p;
531
532         r = p = 0;
533
534         FOR_EACH_REALPLAYER(e)
535         {
536                 p += 1;
537                 if(e.ready)
538                         r += 1;
539         }
540
541         readycount = r;
542
543         Nagger_ReadyCounted();
544
545         if(r) // at least one is ready
546         if(r == p) // and, everyone is ready
547                 ReadyRestart();
548 }
549
550 /**
551  * Restarts the map after the countdown is over (and cvar sv_ready_restart_after_countdown
552  * is set)
553  */
554 void restartTimer_Think() {
555         restart_mapalreadyrestarted = 1;
556         reset_map(TRUE);
557         Score_ClearAll();
558         remove(self);
559         return;
560 }
561
562 /**
563  * Checks whether the player who calls the timeout is allowed to do so.
564  * If so, it initializes the timeout countdown. It also checks whether another
565  * timeout was already running at this time and reacts correspondingly.
566  *
567  * affected globals/fields: .allowedTimeouts, remainingTimeoutTime, remainingLeadTime,
568  *                          timeoutInitiator, timeoutStatus, timeoutHandler
569  *
570  * This function is called when a player issues the calltimeout command.
571  */
572 void evaluateTimeout() {
573         if (inWarmupStage && !g_warmup_allow_timeout)
574                 return sprint(self, "^7Error: You can not call a timeout in warmup-stage!\n");
575         if (time < game_starttime )
576                 return sprint(self, "^7Error: You can not call a timeout while the map is being restarted!\n");
577         if (timeoutStatus != 2) {
578                 //if the map uses a timelimit make sure that timeout cannot be called right before the map ends
579                 if (autocvar_timelimit) {
580                         //a timelimit was used
581                         local float myTl;
582                         myTl = autocvar_timelimit;
583
584                         local float lastPossibleTimeout;
585                         lastPossibleTimeout = (myTl*60) - autocvar_sv_timeout_leadtime - 1;
586
587                         if (lastPossibleTimeout < time - game_starttime)
588                                 return sprint(self, "^7Error: It is too late to call a timeout now!\n");
589                 }
590         }
591         //player may not call a timeout if he has no calls left
592         if (self.allowedTimeouts < 1)
593                 return sprint(self, "^7Error: You already used all your timeout calls for this map!\n");
594         //now all required checks are passed
595         self.allowedTimeouts -= 1;
596         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)
597         remainingTimeoutTime = autocvar_sv_timeout_length;
598         remainingLeadTime = autocvar_sv_timeout_leadtime;
599         timeoutInitiator = self;
600         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
601                 timeoutStatus = 1;
602                 //create the timeout indicator which centerprints the information to all players and takes care of pausing/unpausing
603                 timeoutHandler = spawn();
604                 timeoutHandler.think = timeoutHandler_Think;
605         }
606         timeoutHandler.nextthink = time; //always let the entity think asap
607
608         //inform all connected clients about the timeout call
609         Announce("timeoutcalled");
610 }
611
612 /**
613  * Checks whether a player is allowed to resume the game. If he is allowed to do it,
614  * and the lead time for the timeout is still active, this countdown just will be aborted (the
615  * game will never be paused). Otherwise the remainingTimeoutTime will be set to the corresponding
616  * value of the cvar sv_timeout_resumetime.
617  *
618  * This function is called when a player issues the resumegame command.
619  */
620 void evaluateTimein() {
621         if (!timeoutStatus)
622                 return sprint(self, "^7Error: There is no active timeout which could be aborted!\n");
623         if (self != timeoutInitiator)
624                 return sprint(self, "^7Error: You may not abort the active timeout. Only the player who called it can do that!\n");
625         if (timeoutStatus == 1) {
626                 remainingTimeoutTime = timeoutStatus = 0;
627                 timeoutHandler.nextthink = time; //timeoutHandler has to take care of it immediately
628                 bprint(strcat("^7The timeout was aborted by ", self.netname, " !\n"));
629         }
630         else if (timeoutStatus == 2) {
631                 //only shorten the remainingTimeoutTime if it makes sense
632                 if( remainingTimeoutTime > (autocvar_sv_timeout_resumetime + 1) ) {
633                         bprint(strcat("^1Attention: ^7", self.netname, " resumed the game! Prepare for battle!\n"));
634                         remainingTimeoutTime = autocvar_sv_timeout_resumetime;
635                         timeoutHandler.nextthink = time; //timeoutHandler has to take care of it immediately
636                 }
637                 else
638                         sprint(self, "^7Error: Your resumegame call was discarded!\n");
639
640         }
641 }