1 #using scripts\codescripts\struct;
3 #using scripts\shared\array_shared;
4 #using scripts\shared\audio_shared;
5 #using scripts\shared\callbacks_shared;
6 #using scripts\shared\clientfield_shared;
7 #using scripts\shared\system_shared;
8 #using scripts\shared\util_shared;
10 #insert scripts\shared\shared.gsh;
11 #insert scripts\shared\version.gsh;
13 #using scripts\shared\util_shared;
27 if( !isdefined( level.exert_sounds ) )
29 level.exert_sounds = [];
33 level.exert_sounds[0][
"playerbreathinsound"] =
"vox_exert_generic_inhale";
36 level.exert_sounds[0][
"playerbreathoutsound"] =
"vox_exert_generic_exhale";
39 level.exert_sounds[0][
"playerbreathgaspsound"] =
"vox_exert_generic_exhale";
42 level.exert_sounds[0][
"falldamage"] =
"vox_exert_generic_pain";
45 level.exert_sounds[0][
"mantlesoundplayer"] =
"vox_exert_generic_mantle";
48 level.exert_sounds[0][
"meleeswipesoundplayer"] =
"vox_exert_generic_knifeswipe";
51 level.exert_sounds[0][
"dtplandsoundplayer"] =
"vox_exert_generic_pain";
69 self endon(
"entityshutdown");
70 self endon(
"sndEndExertOverride");
72 self.player_exert_id = newVal;
75 function charindex_cb( localClientNum, oldVal, newVal, bNewEnt, bInitialSnap, fieldName, bWasTimeJump )
79 self.player_exert_id = newVal;
80 self._first_frame_exert_id_recieved =
true;
81 self notify(
"sndEndExertOverride" );
83 else if(!isdefined(
self._first_frame_exert_id_recieved))
85 self._first_frame_exert_id_recieved =
true;
90 function isspeaking_cb( localClientNum, oldVal, newVal, bNewEnt, bInitialSnap, fieldName, bWasTimeJump )
94 self.isSpeaking = newVal;
106 ent =
spawn( 0, (0,0,0),
"script_origin" );
107 playsound( 0,
"mus_zmb_gamemode_start", (0,0,0) );
109 ent playloopsound(
"mus_zmb_gamemode_loop", .05 );
114 level waittill(
"stpm" );
115 self StopAllLoopSounds( .1 );
116 playsound( 0,
"mus_zmb_gamemode_end", (0,0,0) );
139 players = GetLocalPlayers();
140 for (i = 0; i<players.size; i++)
159 if(IsDefined(
self.isSpeaking) &&
self.isSpeaking == 1)
167 id = level.exert_sounds[0][exert];
169 if( isArray(level.exert_sounds[0][exert]))
171 id = array::random(level.exert_sounds[0][exert]);
174 if ( isdefined(
self.player_exert_id) )
176 if(IsArray(level.exert_sounds[
self.player_exert_id][exert]))
178 id = array::random(level.exert_sounds[
self.player_exert_id][exert]);
182 id = level.exert_sounds[
self.player_exert_id][exert];
186 if( isdefined(
id ) )
187 self playsound ( localClientNum,
id);
192 level notify(
"kill_sndVoNotifyDTP" + localClientNum + notifystring );
193 level endon(
"kill_sndVoNotifyDTP" + localClientNum + notifystring );
196 while( !IsDefined( player ) )
198 player = GetNonPredictedLocalPlayer(localClientNum);
201 player endon(
"disconnect");
205 player waittill ( notifyString, surfaceType );
214 while( !IsDefined( player ) )
216 player = GetNonPredictedLocalPlayer(localClientNum);
219 player endon(
"disconnect");
222 player waittill ( notifyString );
223 currentweapon = GetCurrentWeapon( localClientNum );
225 if(
IS_TRUE( level.sndNoMeleeOnClient ) )
230 if (
IS_TRUE(player.is_player_zombie))
232 playsound( 0,
"zmb_melee_whoosh_zmb_plr", player.origin );
234 else if( currentweapon.name ==
"bowie_knife" )
236 playsound( 0,
"zmb_bowie_swing_plr", player.origin );
238 else if( currentweapon.name ==
"spoon_zm_alcatraz" )
240 playsound( 0,
"zmb_spoon_swing_plr", player.origin );
242 else if( currentweapon.name ==
"spork_zm_alcatraz" )
244 playsound( 0,
"zmb_spork_swing_plr", player.origin );
248 playsound( 0,
"zmb_melee_whoosh_plr", player.origin );
255 level notify(
"kill_sndVoNotifyPlain" + localClientNum + notifystring );
256 level endon(
"kill_sndVoNotifyPlain" + localClientNum + notifystring );
259 while( !IsDefined( player ) )
261 player = GetNonPredictedLocalPlayer(localClientNum);
264 player endon(
"disconnect");
268 player waittill ( notifyString );
270 if(
IS_TRUE( player.is_player_zombie ) )
292 level waittill(
"zesn" );
301 self setsoundentcontext(
"grass",
"no_grass");
305 self setsoundentcontext(
"grass",
"in_grass");
309 function sndZmbLaststand(localClientNum, oldVal, newVal, bNewEnt, bInitialSnap, fieldName, bWasTimeJump)
313 PlaySound( localClientNum,
"chr_health_laststand_enter", (0,0,0) );
314 self.inLastStand =
true;
315 setsoundcontext (
"laststand",
"active");
317 if( !IsSplitScreen() )
319 forceambientroom(
"sndHealth_LastStand" );
326 playsound( localClientNum,
"chr_health_laststand_exit", (0,0,0) );
327 self.inLastStand =
false;
329 if( !IsSplitScreen() )
331 forceambientroom(
"" );
335 setsoundcontext (
"laststand",
"");