Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- zombie_damage( mod, hit_location, hit_origin, player )
- {
- shock_ammo = maps\_blst_custom_ammo::blst_shock( self.damageweapon, mod );
- flame_ammo = maps\_blst_custom_ammo::blst_flame( self.damageweapon, mod );
- explosive_ammo = maps\_blst_custom_ammo::blst_explosive( self.damageweapon, mod, self );
- if( is_magic_bullet_shield_enabled( self ) )
- {
- return;
- }
- //ChrisP - 12/8 - no points for killing gassed zombies!
- player.use_weapon_type = mod;
- if(isDefined(self.marked_for_death))
- {
- return;
- }
- if( !IsDefined( player ) )
- {
- return;
- }
- if( shock_ammo )
- {
- shock_tag = maps\_blst_custom_ammo::hit_tag( hit_location );
- if( isdefined( shock_tag ) )
- {
- network_safe_play_fx_on_tag( "shock_impact_fx", 3, level._effect["blst_shock_ammo"], self, shock_tag );
- self playsound( "imp_tesla" );
- }
- }
- if( flame_ammo )
- {
- if( !isdefined( self.flame_ammo_on_fire ) || isdefined( self.flame_ammo_on_fire ) && !self.flame_ammo_on_fire )
- {
- flame_tag = maps\_blst_custom_ammo::hit_tag( hit_location );
- if( isdefined(flame_tag))
- {
- network_safe_play_fx_on_tag( "flame_impact_fx", 3, level._effect["character_fire_pain_sm"], self, flame_tag );
- }
- self thread maps\_blst_custom_ammo::blst_flame_ammo( player );
- }
- }
- if( explosive_ammo )
- {
- expl_tag = maps\_blst_custom_ammo::hit_tag( hit_location );
- if( isdefined( expl_tag))
- {
- network_safe_play_fx_on_tag( "expl_impact_fx", 3, level._effect["blst_expl_ammo"], self, expl_tag );
- }
- self maps\_blst_custom_ammo::blst_expl_ammo( hit_location );
- }
- if( self zombie_flame_damage( mod, player ) )
- {
- if( self zombie_give_flame_damage_points() )
- {
- player maps\_zombiemode_score::player_add_points( "damage", mod, hit_location, self enemy_is_dog() );
- }
- }
- else if( self maps\_zombiemode_tesla::is_tesla_damage( mod ) )
- {
- self maps\_zombiemode_tesla::tesla_damage_init( hit_location, hit_origin, player );
- return;
- }
- else
- {
- player maps\_zombiemode_score::player_add_points( "damage", mod, hit_location, self enemy_is_dog() );
- }
- if ( mod == "MOD_GRENADE" || mod == "MOD_GRENADE_SPLASH" )
- {
- if ( isdefined( player ) && isalive( player ) )
- {
- self DoDamage( level.round_number + randomintrange( 100, 500 ), self.origin, player);
- }
- else
- {
- self DoDamage( level.round_number + randomintrange( 100, 500 ), self.origin, undefined );
- }
- }
- else if( mod == "MOD_PROJECTILE" || mod == "MOD_EXPLOSIVE" || mod == "MOD_PROJECTILE_SPLASH" || mod == "MOD_PROJECTILE_SPLASH")
- {
- if ( isdefined( player ) && isalive( player ) )
- {
- self DoDamage( level.round_number * randomintrange( 0, 100 ), self.origin, player);
- }
- else
- {
- self DoDamage( level.round_number * randomintrange( 0, 100 ), self.origin, undefined );
- }
- }
- else if( mod == "MOD_ZOMBIE_BETTY" )
- {
- if ( isdefined( player ) && isalive( player ) )
- {
- self DoDamage( level.round_number * randomintrange( 100, 200 ), self.origin, player);
- }
- else
- {
- self DoDamage( level.round_number * randomintrange( 100, 200 ), self.origin, undefined );
- }
- }
- //AUDIO Plays a sound when Crawlers are created
- if( IsDefined( self.a.gib_ref ) && (self.a.gib_ref == "no_legs") && isalive( self ) )
- {
- if ( isdefined( player ) )
- {
- rand = randomintrange(0, 100);
- if(rand < 10)
- {
- index = maps\_zombiemode_weapons::get_player_index(player);
- plr = "plr_" + index + "_";
- player thread create_and_play_dialog( plr, "vox_crawl_spawn", 0.25, "resp_cspawn" );
- }
- }
- }
- else if( IsDefined( self.a.gib_ref ) && ( (self.a.gib_ref == "right_arm") || (self.a.gib_ref == "left_arm") ) )
- {
- if( self.has_legs && isalive( self ) )
- {
- if ( isdefined( player ) )
- {
- rand = randomintrange(0, 100);
- if(rand < 3)
- {
- index = maps\_zombiemode_weapons::get_player_index(player);
- plr = "plr_" + index + "_";
- player thread create_and_play_dialog( plr, "vox_shoot_limb", 0.25 );
- }
- }
- }
- }
- self thread maps\_zombiemode_powerups::check_for_instakill( player );
- }
- zombie_damage_ads( mod, hit_location, hit_origin, player )
- {
- shock_ammo = maps\_blst_custom_ammo::blst_shock( self.damageweapon, mod );
- flame_ammo = maps\_blst_custom_ammo::blst_flame( self.damageweapon, mod );
- explosive_ammo = maps\_blst_custom_ammo::blst_explosive( self.damageweapon, mod, self );
- if( is_magic_bullet_shield_enabled( self ) )
- {
- return;
- }
- player.use_weapon_type = mod;
- if( !IsDefined( player ) )
- {
- return;
- }
- if( shock_ammo )
- {
- shock_tag = maps\_blst_custom_ammo::hit_tag( hit_location );
- if( isdefined( shock_tag ) )
- {
- network_safe_play_fx_on_tag( "shock_impact_fx", 3, level._effect["blst_shock_ammo"], self, shock_tag );
- self playsound( "imp_tesla" );
- }
- }
- if( flame_ammo )
- {
- if( !isdefined( self.flame_ammo_on_fire ) || isdefined( self.flame_ammo_on_fire ) && !self.flame_ammo_on_fire )
- {
- flame_tag = maps\_blst_custom_ammo::hit_tag( hit_location );
- if( isdefined(flame_tag))
- {
- network_safe_play_fx_on_tag( "flame_impact_fx", 3, level._effect["character_fire_pain_sm"], self, flame_tag );
- }
- self thread maps\_blst_custom_ammo::blst_flame_ammo( player );
- }
- }
- if( explosive_ammo )
- {
- expl_tag = maps\_blst_custom_ammo::hit_tag( hit_location );
- if( isdefined( expl_tag))
- {
- network_safe_play_fx_on_tag( "expl_impact_fx", 3, level._effect["blst_expl_ammo"], self, expl_tag );
- }
- self maps\_blst_custom_ammo::blst_expl_ammo( hit_location );
- }
- if( self zombie_flame_damage( mod, player ) )
- {
- if( self zombie_give_flame_damage_points() )
- {
- player maps\_zombiemode_score::player_add_points( "damage_ads", mod, hit_location );
- }
- }
- else if( self maps\_zombiemode_tesla::is_tesla_damage( mod ) )
- {
- self maps\_zombiemode_tesla::tesla_damage_init( hit_location, hit_origin, player );
- return;
- }
- else
- {
- player maps\_zombiemode_score::player_add_points( "damage_ads", mod, hit_location );
- }
- self thread maps\_zombiemode_powerups::check_for_instakill( player );
- }
- zombie_give_flame_damage_points()
- {
- if( GetTime() > self.flame_damage_time )
- {
- self.flame_damage_time = GetTime() + level.zombie_vars["zombie_flame_dmg_point_delay"];
- return true;
- }
- return false;
- }
- zombie_flame_damage( mod, player )
- {
- if( mod == "MOD_BURNED" )
- {
- self.moveplaybackrate = 0.8;
- if( !IsDefined( self.is_on_fire ) || ( Isdefined( self.is_on_fire ) && !self.is_on_fire ) )
- {
- self thread damage_on_fire( player );
- }
- do_flame_death = true;
- dist = 100 * 100;
- ai = GetAiArray( "axis" );
- for( i = 0; i < ai.size; i++ )
- {
- if( IsDefined( ai[i].is_on_fire ) && ai[i].is_on_fire )
- {
- if( DistanceSquared( ai[i].origin, self.origin ) < dist )
- {
- do_flame_death = false;
- break;
- }
- }
- }
- if( do_flame_death )
- {
- self thread animscripts\death::flame_death_fx();
- }
- return true;
- }
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement