1 #using scripts\codescripts\struct;
3 #using scripts\shared\array_shared;
4 #using scripts\shared\callbacks_shared;
5 #using scripts\shared\clientfield_shared;
6 #using scripts\shared\system_shared;
7 #using scripts\shared\util_shared;
8 #using scripts\shared\visionset_mgr_shared;
9 #using scripts\shared\weapons\_hive_gun;
10 #using scripts\shared\weapons\_weaponobjects;
12 #insert scripts\mp\gametypes\_globallogic.gsh;
14 #insert scripts\shared\shared.gsh;
15 #insert scripts\shared\version.gsh;
17 #precache( "client_fx", "weapon/fx_hero_annhilatr_death_blood" );
18 #precache( "client_fx", "weapon/fx_hero_pineapple_death_blood" );
20 #namespace globallogic;
37 level._effect[
"annihilate_explosion" ] =
"weapon/fx_hero_annhilatr_death_blood";
38 level._effect[
"pineapplegun_explosion" ] =
"weapon/fx_hero_pineapple_death_blood";
40 level.gameEnded =
false;
41 level.postGame =
false;
45 function game_ended(localClientNum, oldVal, newVal, bNewEnt, bInitialSnap, fieldName, bWasTimeJump)
47 if( newVal && !level.gameEnded )
49 level notify(
"game_ended");
50 level.gameEnded =
true;
54 function post_game(localClientNum, oldVal, newVal, bNewEnt, bInitialSnap, fieldName, bWasTimeJump)
56 if( newVal && !level.postGame )
58 level notify(
"post_game");
59 level.postGame =
true;
63 function firefly_effect_cb(localClientNum, oldVal, newVal, bNewEnt, bInitialSnap, fieldName, bWasTimeJump)
65 if( bNewEnt && newVal)
77 where =
self GetTagOrigin(
"J_SpineLower" );
78 if (!isdefined(where))
80 where = where + (0,0,-40);
82 character_index =
self GetCharacterBodyType();
83 fields = GetCharacterFields( character_index, CurrentSessionMode() );
84 if ( fields.fullbodyexplosion !=
"" )
88 Playfx( localClientNum, fields.fullbodyexplosion, where );
90 Playfx( localClientNum,
"explosions/fx_exp_grenade_default", where );
100 where =
self GetTagOrigin(
"J_SpineLower" );
101 if (!isdefined(where))
104 if ( IsDefined( level._effect[
"pineapplegun_explosion" ] ) )
106 Playfx( localClientNum, level._effect[
"pineapplegun_explosion"], where );
112 #define PLANT_FIRST_SOUND .25
113 #define PLANT_SOUND_INTERVAL .15
117 self endon (
"entityshutdown" );
121 self waittill (
"start_plant_sound" );
128 self notify (
"play_plant_sound" );
129 self endon (
"play_plant_sound" );
130 self endon (
"entityshutdown" );
131 self endon (
"stop_plant_sound" );
133 player = GetLocalPlayer( localClientNum );
134 plantWeapon = GetWeapon(
"briefcase_bomb" );
135 defuseWeapon = GetWeapon(
"briefcase_bomb_defuse" );
141 if ( !isdefined( player ) )
146 if( ( player.weapon != plantWeapon ) && ( player.weapon != defuseWeapon ) )
151 if( ( player !=
self ) || IsThirdPerson( localClientNum ) )
153 self PlaySound( localClientNum,
"fly_bomb_buttons_npc" );