]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/command/common.qc
Merge branch 'master' into Mario/monsters
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / command / common.qc
index e13c4cb979b44dca82818c1ace274a99fa755340..c08b4c898f694bc8154d86ffad3c8fbe00c20d5b 100644 (file)
@@ -1,16 +1,20 @@
 #include "common.qh"
 
-#include <server/defs.qh>
-#include <server/miscfunctions.qh>
-
 #include <common/command/_mod.qh>
-#include "common.qh"
-
-#include "../scores.qh"
-
+#include <common/deathtypes/all.qh>
 #include <common/monsters/_mod.qh>
 #include <common/notifications/all.qh>
+#include <common/stats.qh>
+#include <common/vehicles/all.qh>
+#include <common/weapons/_all.qh>
 #include <lib/warpzone/common.qh>
+#include <server/campaign.qh>
+#include <server/chat.qh>
+#include <server/client.qh>
+#include <server/command/common.qh>
+#include <server/mutators/_mod.qh>
+#include <server/scores.qh>
+#include <server/world.qh>
 
 
 // ====================================================
@@ -28,7 +32,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
 }
 
@@ -717,7 +721,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.");
                                }
@@ -749,7 +753,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