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