]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/command/cmd.qc
Merge branch 'terencehill/server_aliases_fix' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / command / cmd.qc
index 6cac1c4f0620fb5a224e6d8dd2c0a5a39a865873..4494c104db136b94ebdc2cfb5c3d4763b50601e8 100644 (file)
@@ -22,7 +22,7 @@
 #include "../../common/deathtypes/all.qh"
 #include "../../common/mapinfo.qh"
 #include "../../common/notifications.qh"
-#include "../../common/physics.qh"
+#include "../../common/physics/player.qh"
 #include "../../common/teams.qh"
 #include "../../common/util.qh"
 #include "../../common/triggers/triggers.qh"
@@ -174,7 +174,7 @@ void ClientCommand_join(float request)
                                if (!IS_PLAYER(self) && !lockteams && !gameover)
                                {
                                        if (self.caplayer) return;
-                                       if (nJoinAllowed(self))
+                                       if (nJoinAllowed(self, self))
                                        {
                                                if (autocvar_g_campaign)   campaign_bots_may_start = 1;
                                                self.classname = STR_PLAYER;
@@ -607,8 +607,8 @@ void ClientCommand_voice(float request, float argc, string command)
                                        sprint(this, sprintf("Invalid voice. Use one of: %s\n", allvoicesamples));
                                        return;
                                }
-                               if (argc >= 3) VoiceMessage(e, substring(command, argv_start_index(2), argv_end_index(-1) - argv_start_index(2)));
-                               else VoiceMessage(e, "");
+                               if (argc >= 3) VoiceMessage(this, e, substring(command, argv_start_index(2), argv_end_index(-1) - argv_start_index(2)));
+                               else VoiceMessage(this, e, "");
 
                                return;
                        }
@@ -752,6 +752,7 @@ void SV_ParseClientCommand(string command)
                case "prespawn": break;                            // handled by engine in host_cmd.c
                case "sentcvar": break;                            // handled by server in this file
                case "spawn": break;                               // handled by engine in host_cmd.c
+               case "c2s": Net_ClientCommand(this, command); return; // handled by net.qh
 
                default:
                        if (SV_ParseClientCommand_floodcheck()) break; // "true": continue, as we're not flooding yet