r4014 - trunk/data/qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Mon Aug 4 03:56:53 EDT 2008
Author: div0
Date: 2008-08-04 03:56:53 -0400 (Mon, 04 Aug 2008)
New Revision: 4014
Modified:
trunk/data/qcsrc/server/cl_physics.qc
trunk/data/qcsrc/server/cl_player.qc
trunk/data/qcsrc/server/defs.qh
trunk/data/qcsrc/server/sv_main.qc
Log:
play every player sound on CHAN_AUTO except say messages
Modified: trunk/data/qcsrc/server/cl_physics.qc
===================================================================
--- trunk/data/qcsrc/server/cl_physics.qc 2008-08-04 07:37:55 UTC (rev 4013)
+++ trunk/data/qcsrc/server/cl_physics.qc 2008-08-04 07:56:53 UTC (rev 4014)
@@ -81,7 +81,7 @@
else
player_setanim(self.anim_jump, FALSE, TRUE, TRUE);
- PlayerSound(playersound_jump, 0);
+ PlayerSound(playersound_jump, CHAN_AUTO, 0);
}
void CheckWaterJump()
@@ -457,7 +457,7 @@
if(self.flags & FL_ONGROUND)
if not(self.lastflags & FL_ONGROUND)
- PlayerSound(playersound_fall, 0);
+ PlayerSound(playersound_fall, CHAN_AUTO, 0);
self.lastflags = self.flags;
};
Modified: trunk/data/qcsrc/server/cl_player.qc
===================================================================
--- trunk/data/qcsrc/server/cl_player.qc 2008-08-04 07:37:55 UTC (rev 4013)
+++ trunk/data/qcsrc/server/cl_player.qc 2008-08-04 07:56:53 UTC (rev 4014)
@@ -413,13 +413,13 @@
// exclude pain sounds for laserjumps as long as you aren't REALLY low on health and would die of the next two
{
if(self.health > 75) // TODO make a "gentle" version?
- PlayerSound(playersound_pain100, 0);
+ PlayerSound(playersound_pain100, CHAN_AUTO, 0);
else if(self.health > 50)
- PlayerSound(playersound_pain75, 0);
+ PlayerSound(playersound_pain75, CHAN_AUTO, 0);
else if(self.health > 25)
- PlayerSound(playersound_pain50, 0);
+ PlayerSound(playersound_pain50, CHAN_AUTO, 0);
else if(self.health > 1)
- PlayerSound(playersound_pain25, 0);
+ PlayerSound(playersound_pain25, CHAN_AUTO, 0);
}
}
@@ -464,9 +464,9 @@
if(sv_gentle < 1) // TODO make a "gentle" version?
{
if(deathtype == DEATH_DROWN)
- PlayerSound(playersound_drown, 0);
+ PlayerSound(playersound_drown, CHAN_AUTO, 0);
else
- PlayerSound(playersound_death, 0);
+ PlayerSound(playersound_death, CHAN_AUTO, 0);
}
// get rid of kill indicator
@@ -867,7 +867,7 @@
LoadPlayerSounds(strcat(self.model, ".sounds"));
}
-void PlayerSound(.string samplefield, float teamsay)
+void PlayerSound(.string samplefield, float chan, float teamsay)
{
// TODO precache voice messages?
float n;
@@ -890,21 +890,21 @@
if(self.pusher)
if(self.pusher.team == self.team)
{
- soundto(self, self.pusher, CHAN_BODY, sample, 1, ATTN_NONE);
- soundto(self, self, CHAN_BODY, sample, 1, ATTN_NONE);
+ soundto(self, self.pusher, chan, sample, 1, ATTN_NONE);
+ soundto(self, self, chan, sample, 1, ATTN_NONE);
}
}
else if(teamsay == 0) // to everyone
{
// broadcast the sound, but it's directional
- sound(self, CHAN_BODY, sample, 1, ATTN_NORM);
+ sound(self, chan, sample, 1, ATTN_NORM);
}
else if(teamsay == 1) // to the same team
{
entity e;
FOR_EACH_REALCLIENT(e)
if(!teams_matter || e.team == self.team)
- soundto(self, e, CHAN_BODY, sample, 1, ATTN_NONE);
+ soundto(self, e, chan, sample, 1, ATTN_NONE);
}
}
@@ -922,5 +922,5 @@
teamsay = GetVoiceMessageTeamsayType(type);
- PlayerSound(sample, teamsay);
+ PlayerSound(sample, CHAN_VOICE, teamsay);
}
Modified: trunk/data/qcsrc/server/defs.qh
===================================================================
--- trunk/data/qcsrc/server/defs.qh 2008-08-04 07:37:55 UTC (rev 4013)
+++ trunk/data/qcsrc/server/defs.qh 2008-08-04 07:56:53 UTC (rev 4014)
@@ -470,5 +470,5 @@
void PrecachePlayerSounds(string f);
void LoadPlayerSounds(string f);
void UpdatePlayerSounds();
-void PlayerSound(.string samplefield, float teamsay); // 0 is normal, 1 is team, 2 is last attacker
+void PlayerSound(.string samplefield, float channel, float teamsay); // 0 is normal, 1 is team, 2 is last attacker
void VoiceMessage(string type);
Modified: trunk/data/qcsrc/server/sv_main.qc
===================================================================
--- trunk/data/qcsrc/server/sv_main.qc 2008-08-04 07:37:55 UTC (rev 4013)
+++ trunk/data/qcsrc/server/sv_main.qc 2008-08-04 07:56:53 UTC (rev 4014)
@@ -25,7 +25,7 @@
if (self.waterlevel != 3)
{
if(self.air_finished < time + 9)
- PlayerSound(playersound_gasp, 0);
+ PlayerSound(playersound_gasp, CHAN_AUTO, 0);
self.air_finished = time + 12;
self.dmg = 2;
}
More information about the nexuiz-commits
mailing list