X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fcommand%2Fcommon.qc;h=e4299039e3da1e8ee2774a559721ed6be70c6580;hb=0514f7948727cfa572b33bd29d1bdf2c13cd866d;hp=0f59802dd5960e3bdfb72230a7d2d877584ee00a;hpb=c05104bde1e758c4022f9755f02f177aa0476134;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/command/common.qc b/qcsrc/server/command/common.qc index 0f59802dd5..e4299039e3 100644 --- a/qcsrc/server/command/common.qc +++ b/qcsrc/server/command/common.qc @@ -1,19 +1,19 @@ #include "common.qh" -#include -#include -#include -#include -#include - #include -#include "common.qh" - -#include "../scores.qh" - +#include #include #include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include // ==================================================== @@ -31,7 +31,7 @@ string GetCommandPrefix(entity caller) // if client return player nickname, or if server return admin nickname string GetCallerName(entity caller) { - if (caller) return playername(caller, false); + if (caller) return playername(caller.netname, caller.team, false); else return ((autocvar_sv_adminnick != "") ? autocvar_sv_adminnick : "SERVER ADMIN"); // autocvar_hostname } @@ -720,7 +720,7 @@ void CommonCommand_timeout(int request, entity caller) // DEAR GOD THIS COMMAND { print_to(caller, "^7Error: You can not call a timeout while a vote is active."); } - else if (warmup_stage && !g_warmup_allow_timeout) + else if (warmup_stage && !autocvar_g_warmup_allow_timeout) { print_to(caller, "^7Error: You can not call a timeout in warmup-stage."); } @@ -752,7 +752,7 @@ void CommonCommand_timeout(int request, entity caller) // DEAR GOD THIS COMMAND timeout_time = autocvar_sv_timeout_length; timeout_leadtime = autocvar_sv_timeout_leadtime; - timeout_handler = spawn(); + timeout_handler = new(timeout_handler); setthink(timeout_handler, timeout_handler_think); timeout_handler.nextthink = time; // always let the entity think asap