-#include "../../common/command/command.qh"
#include "cmd.qh"
+#include <common/command/command.qh>
#include "common.qh"
#include "vote.qh"
#include "../mutators/all.qh"
#ifdef SVQC
- #include "../../common/vehicles/all.qh"
+ #include <common/vehicles/all.qh>
#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 <common/constants.qh>
+#include <common/deathtypes/all.qh>
+#include <common/effects/all.qh>
+#include <common/mapinfo.qh>
+#include <common/notifications/all.qh>
+#include <common/physics/player.qh>
+#include <common/teams.qh>
+#include <common/util.qh>
+#include <common/triggers/triggers.qh>
-#include "../../common/minigames/sv_minigames.qh"
+#include <common/minigames/sv_minigames.qh>
-#include "../../common/monsters/all.qc"
-#include "../../common/monsters/spawn.qh"
-#include "../../common/monsters/sv_monsters.qh"
+#include <common/monsters/all.qc>
+#include <common/monsters/spawn.qh>
+#include <common/monsters/sv_monsters.qh>
-#include "../../lib/warpzone/common.qh"
+#include <lib/warpzone/common.qh>
void ClientKill_TeamChange(float targetteam); // 0 = don't change, -1 = auto, -2 = spec
}
else if (teamplay && !autocvar_sv_spectate && !(self.team_forced > 0))
{
- self.classname = STR_OBSERVER; // really?
+ TRANSMUTE(Observer, self); // really?
stuffcmd(self, "menu_showteamselect\n");
}
}
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;
+ if (autocvar_g_campaign) campaign_bots_may_start = true;
+ TRANSMUTE(Player, self);
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);
+ Kill_Notification(NOTIF_ONE_ONLY, self, MSG_CENTER, CPID_PREVENT_JOIN);
+ 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
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");
}
tokenize_console(s);
}
- GetCvars(1);
+ GetCvars(this, 1);
return;
}
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;
}
if (command != command2) return;
// if we're banned, don't even parse the command
- if (Ban_MaybeEnforceBanOnce(self)) return;
+ if (Ban_MaybeEnforceBanOnce(this)) return;
float argc = tokenize_console(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
{
if (argc == 1)
{
- sprint(self, "\nClient networked commands:\n");
+ sprint(this, "\nClient networked commands:\n");
ClientCommand_macro_help();
- sprint(self, "\nCommon networked commands:\n");
- CommonCommand_macro_help(self);
+ sprint(this, "\nCommon networked commands:\n");
+ CommonCommand_macro_help(this);
- sprint(self, "\nUsage:^3 cmd COMMAND...^7, where possible commands are listed above.\n");
- sprint(self, "For help about a specific command, type cmd help COMMAND\n");
+ sprint(this, "\nUsage:^3 cmd COMMAND...^7, where possible commands are listed above.\n");
+ sprint(this, "For help about a specific command, type cmd help COMMAND\n");
return;
}
- else if (CommonCommand_macro_usage(argc, self)) // Instead of trying to call a command, we're going to see detailed information about it
+ else if (CommonCommand_macro_usage(argc, this)) // Instead of trying to call a command, we're going to see detailed information about it
{
return;
}
{
return; // handled by server/cheats.qc
}
- else if (CommonCommand_macro_command(argc, self, command))
+ else if (CommonCommand_macro_command(argc, this, command))
{
return; // handled by server/command/common.qc
}
}
else
{
- clientcommand(self, command);
+ clientcommand(this, command);
}
}