]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/cl_player.qh
Merge branch 'master' into Mirio/balance
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / cl_player.qh
index 76c49d852f572c2f1138c00eb538b25f5db56204..22c595f66d3cd9ca4a59ce2e507e0d9f65dc2524 100644 (file)
@@ -1,5 +1,4 @@
-#ifndef CL_PLAYER_H
-#define CL_PLAYER_H
+#pragma once
 
 .entity pusher;
 .float pushltime;
@@ -8,13 +7,13 @@
 .float CopyBody_nextthink;
 .void() CopyBody_think;
 void CopyBody_Think();
-void CopyBody(float keepvelocity);
+void CopyBody(entity this, float keepvelocity);
 
 void player_setupanimsformodel();
 
 void player_anim();
 
-void PlayerCorpseDamage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force);
+void PlayerCorpseDamage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force);
 
 // g_<gametype>_str:
 // If 0, default is used.
@@ -27,98 +26,14 @@ void PlayerCorpseDamage(entity inflictor, entity attacker, float damage, int dea
        : (gametype_setting_tmp == 0 || autocvar_g_respawn_delay_forced) ? max(0, autocvar_g_##str) \
        : gametype_setting_tmp)
 
-void calculate_player_respawn_time();
+void calculate_player_respawn_time(entity this);
 
-void ClientKill_Now_TeamChange();
+void ClientKill_Now_TeamChange(entity this);
 
 void MoveToTeam(entity client, float team_colour, float type);
 
-void PlayerDamage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force);
+void PlayerDamage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force);
 
 /** to be used by `prvm_edictset server playernumber muted 1` */
 .float muted;
 int Say(entity source, float teamsay, entity privatesay, string msgin, float floodcontrol);
-
-// player sounds, voice messages
-// TODO implemented fall and falling
-#define ALLPLAYERSOUNDS(X) \
-       X(death) \
-       X(drown) \
-       X(fall) \
-       X(falling) \
-       X(gasp) \
-       X(jump) \
-       X(pain100) \
-       X(pain25) \
-       X(pain50) \
-       X(pain75)
-
-#define ALLVOICEMSGS(X) \
-       X(attack) \
-       X(attackinfive) \
-       X(coverme) \
-       X(defend) \
-       X(freelance) \
-       X(incoming) \
-       X(meet) \
-       X(needhelp) \
-       X(seenflag) \
-       X(taunt) \
-       X(teamshoot)
-
-// reserved sound names for the future (some models lack sounds for them):
-// _VOICEMSG(flagcarriertakingdamage)
-// _VOICEMSG(getflag)
-// reserved sound names for the future (ALL models lack sounds for them):
-// _VOICEMSG(affirmative)
-// _VOICEMSG(attacking)
-// _VOICEMSG(defending)
-// _VOICEMSG(roaming)
-// _VOICEMSG(onmyway)
-// _VOICEMSG(droppedflag)
-// _VOICEMSG(negative)
-// _VOICEMSG(seenenemy)
-
-#define X(m) .string playersound_##m;
-ALLPLAYERSOUNDS(X)
-ALLVOICEMSGS(X)
-#undef X
-
-bool GetPlayerSoundSampleField_notFound;
-float GetVoiceMessageVoiceType(string type);
-.string GetVoiceMessageSampleField(string type);
-.string GetPlayerSoundSampleField(string type);
-void PrecacheGlobalSound(string samplestring);
-void PrecachePlayerSounds(string f);
-void ClearPlayerSounds(entity this);
-float LoadPlayerSounds(string f, bool strict);
-void UpdatePlayerSounds(entity this);
-#define FakeGlobalSound(sample, chan, voicetype) _GlobalSound(sample, chan, voicetype, true)
-void _GlobalSound(string sample, float chan, float voicetype, bool fake);
-#define GlobalSound(def, chan, voicetype) _GlobalSound((def).m_globalsoundstr, chan, voicetype, false)
-void PlayerSound(.string samplefield, float chan, float voicetype);
-void VoiceMessage(string type, string msg);
-
-.string m_globalsoundstr;
-REGISTRY(GlobalSounds, BITS(8) - 1)
-#define GlobalSounds_from(i) _GlobalSounds_from(i, NULL)
-#define REGISTER_GLOBALSOUND(id, str) \
-       REGISTER(GlobalSounds, GS, id, m_id, new(GlobalSound)) \
-       { \
-               make_pure(this); \
-               this.m_globalsoundstr = str; \
-       }
-REGISTER_REGISTRY(GlobalSounds)
-REGISTRY_SORT(GlobalSounds, 0)
-REGISTRY_CHECK(GlobalSounds)
-PRECACHE(GlobalSounds)
-{
-       FOREACH(GlobalSounds, true, LAMBDA(PrecacheGlobalSound(it.m_globalsoundstr)));
-}
-
-REGISTER_GLOBALSOUND(STEP, "misc/footstep0 6")
-REGISTER_GLOBALSOUND(STEP_METAL, "misc/metalfootstep0 6")
-REGISTER_GLOBALSOUND(FALL, "misc/hitground 4")
-REGISTER_GLOBALSOUND(FALL_METAL, "misc/metalhitground 4")
-
-#endif