#include "cl_player.qh"
-#include "_all.qh"
#include "bot/bot.qh"
#include "cheats.qh"
#include "../common/deathtypes.qh"
#include "../common/triggers/subs.qh"
#include "../common/playerstats.qh"
-#include "../csqcmodellib/sv_model.qh"
+#include "../lib/csqcmodel/sv_model.qh"
#include "../common/minigames/sv_minigames.qh"
+#include "../common/mutators/mutator/waypoints/waypointsprites.qh"
+#include "../common/triggers/include.qh"
+
#include "weapons/weaponstats.qh"
#include "../common/animdecide.qh"
if(sound_allowed(MSG_BROADCAST, attacker))
{
if (save > 10)
- sound (self, CH_SHOTS, "misc/armorimpact.wav", VOL_BASE, ATTEN_NORM);
+ sound (self, CH_SHOTS, SND_ARMORIMPACT, VOL_BASE, ATTEN_NORM);
else if (take > 30)
- sound (self, CH_SHOTS, "misc/bodyimpact2.wav", VOL_BASE, ATTEN_NORM);
+ sound (self, CH_SHOTS, SND_BODYIMPACT2, VOL_BASE, ATTEN_NORM);
else if (take > 10)
- sound (self, CH_SHOTS, "misc/bodyimpact1.wav", VOL_BASE, ATTEN_NORM);
+ sound (self, CH_SHOTS, SND_BODYIMPACT1, VOL_BASE, ATTEN_NORM);
}
if (take > 50)
if(sound_allowed(MSG_BROADCAST, attacker))
{
if (save > 10)
- sound (self, CH_SHOTS, "misc/armorimpact.wav", VOL_BASE, ATTEN_NORM);
+ sound (self, CH_SHOTS, SND_ARMORIMPACT, VOL_BASE, ATTEN_NORM);
else if (take > 30)
- sound (self, CH_SHOTS, "misc/bodyimpact2.wav", VOL_BASE, ATTEN_NORM);
+ sound (self, CH_SHOTS, SND_BODYIMPACT2, VOL_BASE, ATTEN_NORM);
else if (take > 10)
- sound (self, CH_SHOTS, "misc/bodyimpact1.wav", VOL_BASE, ATTEN_NORM); // FIXME possibly remove them?
+ sound (self, CH_SHOTS, SND_BODYIMPACT1, VOL_BASE, ATTEN_NORM); // FIXME possibly remove them?
}
if (take > 50)
MUTATOR_CALLHOOK(PlayerDies, inflictor, attacker, self, deathtype);
excess = frag_damage;
- WEP_ACTION(self.weapon, WR_PLAYERDEATH);
+ Weapon wep = get_weaponinfo(self.weapon);
+ wep.wr_playerdeath(wep);
RemoveGrapplingHook(self);
// reset fields the weapons may use just in case
for (j = WEP_FIRST; j <= WEP_LAST; ++j)
{
- WEP_ACTION(j, WR_RESETPLAYER);
+ Weapon w = get_weaponinfo(j);
+ w.wr_resetplayer(w);
ATTACK_FINISHED_FOR(self, j) = 0;
}
}
{
sprint(source, sourcemsgstr);
dedicated_print(msgstr); // send to server console too
- FOR_EACH_REALCLIENT(head)
+ FOR_EACH_REALCLIENT(head)
if(head != source)
if(head.active_minigame == source.active_minigame)
sprint(head, msgstr);
void PrecachePlayerSounds(string f)
{
- float fh;
- string s;
- fh = fopen(f, FILE_READ);
- if(fh < 0)
+ int fh = fopen(f, FILE_READ);
+ if (fh < 0)
return;
- while((s = fgets(fh)))
+ for (string s; (s = fgets(fh)); )
{
- if(tokenize_console(s) != 3)
+ int n = tokenize_console(s);
+ if (n != 3)
{
- LOG_TRACE("Invalid sound info line: ", s, "\n");
+ if (n != 0) LOG_TRACEF("Invalid sound info line: %s\n", s);
continue;
}
PrecacheGlobalSound(strcat(argv(1), " ", argv(2)));
}
break;
case VOICETYPE_PLAYERSOUND:
- sound(self, chan, sample, VOL_BASE, ATTEN_NORM);
+ _sound(self, chan, sample, VOL_BASE, ATTEN_NORM);
break;
default:
backtrace("Invalid voice type!");
void VoiceMessage(string type, string msg)
{SELFPARAM();
- var .string sample;
float voicetype, ownteam;
float flood;
- sample = GetVoiceMessageSampleField(type);
+ var .string sample = GetVoiceMessageSampleField(type);
if(GetPlayerSoundSampleField_notFound)
{