X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fserver%2Fclient.qh;h=6cf13da2a43746c4bdc49481e991a3fe39b18ec8;hp=2282c09cbb1cafd54e3a667886430b98b554c342;hb=ca28b3282b10ed5651fbd2e2e03912f8a591ecc0;hpb=05776c4204bf73c8ebc84e615ad088af45ebe5ed diff --git a/qcsrc/server/client.qh b/qcsrc/server/client.qh index 2282c09cbb..6cf13da2a4 100644 --- a/qcsrc/server/client.qh +++ b/qcsrc/server/client.qh @@ -17,7 +17,7 @@ CLASS(Client, Object) /** Client IP */ ATTRIB(Client, netaddress, string, this.netaddress); ATTRIB(Client, playermodel, string, this.playermodel); - ATTRIB(Client, playerskin, int, this.playerskin); + ATTRIB(Client, playerskin, string, this.playerskin); /** fingerprint of CA key the player used to authenticate */ ATTRIB(Client, crypto_keyfp, string, this.crypto_keyfp); @@ -73,7 +73,6 @@ CLASS(Client, Object) 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); @@ -86,6 +85,7 @@ CLASS(Client, Object) 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); @@ -113,6 +113,8 @@ CLASS(Client, Object) 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); + ATTRIB(Client, autojoin_checked, bool, this.wasplayer); // networked cvars @@ -143,6 +145,9 @@ CLASS(Client, Object) 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); + ATTRIB(Client, cvar_cl_cts_noautoswitch, bool, this.cvar_cl_cts_noautoswitch); + ATTRIB(Client, cvar_cl_weapon_switch_reload, bool, this.cvar_cl_weapon_switch_reload); + ATTRIB(Client, cvar_cl_weapon_switch_fallback_to_impulse, bool, this.cvar_cl_weapon_switch_fallback_to_impulse); METHOD(Client, m_unwind, bool(Client this)); @@ -224,11 +229,62 @@ METHOD(Client, m_unwind, bool(Client this)) return false; } +bool PlayerInList(entity player, string list); + +/// \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); float CalcRotRegen(float current, float regenstable, float regenfactor, float regenlinear, float regenframetime, float rotstable, float rotfactor, float rotlinear, float rotframetime, float limit); bool Spectate(entity this, entity pl); -#define SPECTATE_COPY() [[accumulate]] void SpectateCopy(entity this, entity spectatee) +void ClientInit_Spawn(); + +void PutObserverInServer(entity this); + +void SetSpectatee(entity this, entity spectatee); +void SetSpectatee_status(entity this, int spectatee_num); + +void FixPlayermodel(entity player); + +void ClientInit_misc(entity this); + +int GetPlayerLimit(); + +bool joinAllowed(entity this); +void Join(entity this); + +#define SPECTATE_COPY() ACCUMULATE void SpectateCopy(entity this, entity spectatee) #define SPECTATE_COPYFIELD(fld) SPECTATE_COPY() { this.(fld) = spectatee.(fld); } + +int Say(entity source, float teamsay, entity privatesay, string msgin, float floodcontrol);