X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fserver%2Fcommand%2Fcommon.qc;h=14f7439a4fcc35f3971acb942f9a75e9121dc809;hp=6e43d9a7bf6af39824138bec8789cf774bb071ca;hb=42a9e3d7ece2c716e5cd6899e90841acb7fb891b;hpb=826222f84e886d85179a032b07edc71d99982040 diff --git a/qcsrc/server/command/common.qc b/qcsrc/server/command/common.qc index 6e43d9a7b..14f7439a4 100644 --- a/qcsrc/server/command/common.qc +++ b/qcsrc/server/command/common.qc @@ -183,19 +183,17 @@ void print_to(entity to, string input) // ========================================== // used by CommonCommand_timeout() and CommonCommand_timein() to handle game pausing and messaging and such. -void timeout_handler_reset() +void timeout_handler_reset(entity this) { - SELFPARAM(); - timeout_caller = world; + timeout_caller = NULL; timeout_time = 0; timeout_leadtime = 0; - remove(self); + remove(this); } -void timeout_handler_think() +void timeout_handler_think(entity this) { - SELFPARAM(); switch (timeout_status) { case TIMEOUT_ACTIVE: @@ -222,7 +220,7 @@ void timeout_handler_think() it.fixangle = false; )); - timeout_handler_reset(); + timeout_handler_reset(this); } return; @@ -266,7 +264,7 @@ void timeout_handler_think() case TIMEOUT_INACTIVE: default: { - timeout_handler_reset(); + timeout_handler_reset(this); return; } } @@ -321,7 +319,6 @@ void CommonCommand_cvar_purechanges(float request, entity caller) void CommonCommand_editmob(int request, entity caller, int argc) { - SELFPARAM(); switch (request) { case CMD_REQUEST_COMMAND: @@ -474,7 +471,7 @@ void CommonCommand_info(float request, entity caller, float argc) { string command = builtin_cvar_string(strcat("sv_info_", argv(1))); - if (command) wordwrap_sprint(command, 1000); + if (command) wordwrap_sprint(caller, command, 1000); else print_to(caller, "ERROR: unsupported info command"); return; // never fall through to usage @@ -741,7 +738,7 @@ void CommonCommand_timeout(float request, entity caller) // DEAR GOD THIS COMMA timeout_leadtime = autocvar_sv_timeout_leadtime; timeout_handler = spawn(); - timeout_handler.think = timeout_handler_think; + setthink(timeout_handler, timeout_handler_think); timeout_handler.nextthink = time; // always let the entity think asap Send_Notification(NOTIF_ALL, world, MSG_ANNCE, ANNCE_TIMEOUT);