X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fcommand%2Fcmd.qc;h=4494c104db136b94ebdc2cfb5c3d4763b50601e8;hb=2487070c23bdcfc8ac60d414356ec43f52ec1a57;hp=6cac1c4f0620fb5a224e6d8dd2c0a5a39a865873;hpb=4ee6ff910ba31d6a2246eeceb0f9fe40d3874619;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/command/cmd.qc b/qcsrc/server/command/cmd.qc index 6cac1c4f0..4494c104d 100644 --- a/qcsrc/server/command/cmd.qc +++ b/qcsrc/server/command/cmd.qc @@ -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