X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;ds=sidebyside;f=qcsrc%2Fserver%2Fcommand%2Fcmd.qc;h=a7610003881ceb543b81b86269ede82a948ff9aa;hb=39d7296bebbb6ea486c5cdb59c7f60d11aedd1c3;hp=573b9417f99f887859b34243b515c8c5ced79224;hpb=71ce27cd515d7e8157535466ef357f83253b64f0;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/command/cmd.qc b/qcsrc/server/command/cmd.qc index 573b9417f..a76100038 100644 --- a/qcsrc/server/command/cmd.qc +++ b/qcsrc/server/command/cmd.qc @@ -1,4 +1,4 @@ -#include "../../common/command/command.qh" +#include #include "cmd.qh" #include "common.qh" @@ -15,25 +15,25 @@ #include "../mutators/all.qh" #ifdef SVQC - #include "../../common/vehicles/all.qh" + #include #endif -#include "../../common/constants.qh" -#include "../../common/deathtypes/all.qh" -#include "../../common/mapinfo.qh" -#include "../../common/notifications.qh" -#include "../../common/physics.qh" -#include "../../common/teams.qh" -#include "../../common/util.qh" -#include "../../common/triggers/triggers.qh" +#include +#include +#include +#include +#include +#include +#include +#include -#include "../../common/minigames/sv_minigames.qh" +#include -#include "../../common/monsters/all.qc" -#include "../../common/monsters/spawn.qh" -#include "../../common/monsters/sv_monsters.qh" +#include +#include +#include -#include "../../lib/warpzone/common.qh" +#include void ClientKill_TeamChange(float targetteam); // 0 = don't change, -1 = auto, -2 = spec @@ -174,13 +174,13 @@ 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; PlayerScore_Clear(self); Kill_Notification(NOTIF_ONE_ONLY, self, MSG_CENTER_CPID, CPID_PREVENT_JOIN); - Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_JOIN_PLAY, self.netname); + Send_Notification(NOTIF_ALL, world, MSG_INFO, ((teamplay && self.team != -1) ? APP_TEAM_ENT(this, INFO_JOIN_PLAY_TEAM) : INFO_JOIN_PLAY), self.netname); PutClientInServer(); } else @@ -372,7 +372,7 @@ void ClientCommand_selectteam(float request, float argc) if (selection) { - if (self.team == selection && self.deadflag == DEAD_NO) + if (self.team == selection && !IS_DEAD(self)) { sprint(self, "^7You already are on that team.\n"); } @@ -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