#pragma once
+#include "utils.qh"
+#include <common/sounds/all.qh>
+
void ClientState_attach(entity this);
IntrusiveList g_players;
ATTRIB(Client, parm_idlesince, int, this.parm_idlesince);
ATTRIB(Client, muted, bool, this.muted);
- ATTRIB(Client, killindicator_teamchange, int, this.killindicator_teamchange);
ATTRIB(Client, idlekick_lasttimeleft, float, this.idlekick_lasttimeleft);
ATTRIB(Client, pm_frametime, float, this.pm_frametime);
ATTRIB(Client, pressedkeys, int, this.pressedkeys);
ATTRIB(Client, motd_actived_time, float, this.motd_actived_time);
ATTRIB(Client, jointime, float, this.jointime);
ATTRIB(Client, spectatortime, float, this.spectatortime);
+ ATTRIB(Client, startplaytime, float, this.startplaytime);
ATTRIB(Client, version_nagtime, float, this.version_nagtime);
ATTRIB(Client, netname_previous, string, this.netname_previous);
ATTRIB(Client, allowed_timeouts, int, this.allowed_timeouts);
ATTRIB(Client, clientdata, entity, this.clientdata);
ATTRIB(Client, cmd_floodcount, int, this.cmd_floodcount);
ATTRIB(Client, cmd_floodtime, float, this.cmd_floodtime);
+ ATTRIB(Client, wasplayer, bool, this.wasplayer);
+ ATTRIB(Client, weaponorder_byimpulse, string, this.weaponorder_byimpulse);
// networked cvars
ATTRIB(Client, cvar_cl_multijump, bool, this.cvar_cl_multijump);
ATTRIB(Client, cvar_cl_accuracy_data_share, bool, this.cvar_cl_accuracy_data_share);
ATTRIB(Client, cvar_cl_accuracy_data_receive, bool, this.cvar_cl_accuracy_data_receive);
+ ATTRIBARRAY(Client, cvar_cl_weaponpriorities, string, 10);
+ ATTRIB(Client, cvar_cl_weaponpriority, string, this.cvar_cl_weaponpriority);
METHOD(Client, m_unwind, bool(Client this));
ENDCLASS(Spectator)
CLASS(Player, Client)
-
+
// custom
ATTRIB(Player, dual_weapons, vector, this.dual_weapons); // TODO: actually WepSet!
ATTRIB(Player, itemkeys, int, this.itemkeys);
+ ATTRIB(Player, ballistics_density, float, this.ballistics_density);
+ ATTRIB(Player, prevstrengthsound, float, this.prevstrengthsound);
+ ATTRIB(Player, prevstrengthsoundattempt, float, this.prevstrengthsoundattempt);
+ ATTRIB(Player, buff_shield, float, this.buff_shield);
INIT(Player) {
this.classname = STR_PLAYER;
return false;
}
-float c1, c2, c3, c4;
+/** print(), but only print if the server is not local */
+void dedicated_print(string input);
+
+/// \brief Print the string to the client's chat.
+/// \param[in] client Client to print to.
+/// \param[in] text Text to print.
+void PrintToChat(entity client, string text);
+
+/// \brief Print the string to the client's chat if the server cvar "developer"
+/// is not 0.
+/// \param[in] client Client to print to.
+/// \param[in] text Text to print.
+void DebugPrintToChat(entity client, string text);
+
+/// \brief Prints the string to all clients' chat.
+/// \param[in] text Text to print.
+void PrintToChatAll(string text);
+
+/// \brief Prints the string to all clients' chat if the server cvar "developer"
+/// is not 0.
+/// \param[in] text Text to print.
+void DebugPrintToChatAll(string text);
+
+/// \brief Print the string to chat of all clients of the specified team.
+/// \param[in] team_num Team to print to. See NUM_TEAM constants.
+/// \param[in] text Text to print.
+void PrintToChatTeam(int team_num, string text);
+
+/// \brief Print the string to chat of all clients of the specified team if the
+/// server cvar "developer" is not 0.
+/// \param[in] team_num Team to print to. See NUM_TEAM constants.
+/// \param[in] text Text to print.
+void DebugPrintToChatTeam(int team_num, string text);
void play_countdown(entity this, float finished, Sound samp);
bool Spectate(entity this, entity pl);
-#define SPECTATE_COPY() [[accumulate]] void SpectateCopy(entity this, entity spectatee)
+#define SPECTATE_COPY() ACCUMULATE void SpectateCopy(entity this, entity spectatee)
#define SPECTATE_COPYFIELD(fld) SPECTATE_COPY() { this.(fld) = spectatee.(fld); }