heartbeat sound

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6549 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
sireus
2011-06-29 20:25:42 +00:00
parent 773d42f7c5
commit 2e3de34c60
8 changed files with 22 additions and 3 deletions
+2 -1
View File
@@ -9,6 +9,7 @@ Find me a cat!
---------------------
[*] Changelog updates - oh shi-
[*] Optional heartbeat sound when health reaches a certain level.
// TODO : find a better order for these categories
@@ -191,4 +192,4 @@ I18n / L10n
[*] Client now tries to set the LANG alias if it's not defined.
[*] fixed LANG for windows (breaks Win98/2K compatibility!)
[*] Float separator set to "." (dot) regardless of locale.
[*] Float separator set to "." (dot) regardless of locale.
+1
View File
@@ -518,6 +518,7 @@ menuitemcheckbox "Die 1: " "(soundmuted 32)" [ mutesound 32 (! $arg1) ]
menuitemcheckbox "Die 2: " "(soundmuted 33)" [ mutesound 33 (! $arg1) ]
menuitemcheckbox "Gib sounds: " "(soundmuted 48)" [ mutesound 48 (! $arg1) ]
menuitemcheckbox "Tinnitus: " "(soundmuted 62)" [ mutesound 62 (! $arg1) ]
menuitemcheckbox "Heartbeat: " "(soundmuted 100)" [ mutesound 100 (! $arg1) ]
newmenu "Mute movement sounds"
+2 -1
View File
@@ -109,7 +109,8 @@ registersound "voicecom/thanks_1" // 95 : public
registersound "voicecom/thanks_2" // 96 : public
registersound "voicecom/awesome_1" // 97 : public
registersound "voicecom/awesome_2" // 98 : public
registersound "misc/pickup_helmet" // 99 - S_ITEMHELMET
registersound "misc/pickup_helmet" // 99 - S_ITEMHELMET
registersound "player/heartbeat" // 100 - S_HEARTBEAT
// Music
registermusic "pingpong/Ping_Pong_-_Kamikadze" // M_FLAGGRAB
+5
View File
@@ -4854,6 +4854,11 @@ Output:
<value token="N" description="velocity" minValue="1" maxValue="100" defaultValue="30"/>
</variable>
<variable name="heartbeat">
<description>Defines the health level at or below which a heartbeat sound will be played. A value of 0 (which is the default) disables this feature.</description>
<value token="H" description="health value" minValue="0" maxValue="99" defaultValue="0"/>
</variable>
<variable name="teamdisplaymode">
<description>Sets the team display mode.</description>
<remarks>
Binary file not shown.
+4
View File
@@ -0,0 +1,4 @@
heartbeat.ogg by Lunardrive (http://www.freesound.org/usersViewSingle.php?id=120830)
Four Heartbeats HQ_BeatSmith.wav (http://www.freesound.org/samplesViewSingle.php?id=22416)
This file is licensed under the Creative Commons Sampling Plus 1.0 License. To view a copy of this license, visit http://creativecommons.org/licenses/sampling+/1.0/ or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.
+7 -1
View File
@@ -532,6 +532,8 @@ void audiomanager::stopsound()
if(gamemusic) gamemusic->reset();
}
VAR(heartbeat, 0, 0, 99);
// main audio update routine
void audiomanager::updateaudio()
@@ -540,7 +542,7 @@ void audiomanager::updateaudio()
alcSuspendContext(context); // don't process sounds while we mess around
//bool alive = player1->state!=CS_DEAD;
bool alive = player1->state!=CS_DEAD;
bool firstperson = camera1==player1 || (player1->isspectating() && player1->spectatemode==SM_DEATHCAM);
// footsteps
@@ -560,6 +562,10 @@ void audiomanager::updateaudio()
bool tinnitus = /*alive &&*/ firstperson && player1->eardamagemillis>0 && lastmillis<=player1->eardamagemillis;
location *tinnitusloc = updateloopsound(S_TINNITUS, tinnitus);
// heartbeat
bool heartbeatsound = heartbeat && alive && firstperson && player1->health <= heartbeat;
updateloopsound(S_HEARTBEAT, heartbeatsound);
// pitch fx
const float lowpitch = 0.65f;
bool pitchfx = underwater || tinnitus;
+1
View File
@@ -70,6 +70,7 @@ enum
S_AWESOME1,
S_AWESOME2,
S_ITEMHELMET, // begin: Sounds for AssaultCube v1.1.0.4 onwards
S_HEARTBEAT,
S_NULL
};