]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/server/player.qh
08702316d40deab492adbe66cdae7d30dd15fa85
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / player.qh
1 #pragma once
2
3 .entity pusher;
4 .float pushltime;
5 .float istypefrag;
6
7 .float CopyBody_nextthink;
8 .void(entity this) CopyBody_think;
9 void CopyBody_Think(entity this);
10 void CopyBody(entity this, float keepvelocity);
11
12 void dedicated_print(string input);
13
14 /// \brief Print the string to player's chat.
15 /// \param[in] player Player to print to.
16 /// \param[in] text Text to print.
17 /// \return No return.
18 void PrintToChat(entity player, string text);
19
20 /// \brief Print the string to player's chat if the server cvar "developer" is
21 /// not 0.
22 /// \param[in] player Player to print to.
23 /// \param[in] text Text to print.
24 /// \return No return.
25 void DebugPrintToChat(entity player, string text);
26
27 /// \brief Prints the string to all players' chat.
28 /// \param[in] text Text to print.
29 /// \return No return.
30 void PrintToChatAll(string text);
31
32 /// \brief Prints the string to all players' chat if the server cvar "developer"
33 /// is not 0.
34 /// \param[in] text Text to print.
35 /// \return No return.
36 void DebugPrintToChatAll(string text);
37
38 void player_setupanimsformodel(entity this);
39
40 void player_anim(entity this);
41
42 void PlayerCorpseDamage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force);
43
44 // g_<gametype>_str:
45 // If 0, default is used.
46 // If <0, 0 is used.
47 // Otherwise, g_str (default value) is used.
48 // For consistency, negative values there are mapped to zero too.
49 #define GAMETYPE_DEFAULTED_SETTING(str) \
50         ((gametype_setting_tmp = cvar(strcat("g_", GetGametype(), "_" #str))), \
51         (gametype_setting_tmp < 0) ? 0 \
52         : (gametype_setting_tmp == 0 || autocvar_g_respawn_delay_forced) ? max(0, autocvar_g_##str) \
53         : gametype_setting_tmp)
54
55 void calculate_player_respawn_time(entity this);
56
57 void ClientKill_Now_TeamChange(entity this);
58
59 void MoveToTeam(entity client, float team_colour, float type);
60
61 void PlayerDamage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force);
62
63 /** to be used by `prvm_edictset server playernumber muted 1` */
64 .float muted;
65 int Say(entity source, float teamsay, entity privatesay, string msgin, float floodcontrol);