]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/command/common.qc
Merge branch 'terencehill/v_deathtilt_fix' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / command / common.qc
index 6e43d9a7bf6af39824138bec8789cf774bb071ca..14f7439a4fcc35f3971acb942f9a75e9121dc809 100644 (file)
@@ -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);