mirror of
https://github.com/JezuzLizard/BO2-Reimagined.git
synced 2025-07-04 02:48:18 -05:00
Move replaced functions into separate scripts
This commit is contained in:
80
scripts/zm/replaced/_zm_powerups.gsc
Normal file
80
scripts/zm/replaced/_zm_powerups.gsc
Normal file
@ -0,0 +1,80 @@
|
||||
#include maps\mp\_utility;
|
||||
#include common_scripts\utility;
|
||||
#include maps\mp\zombies\_zm_utility;
|
||||
|
||||
nuke_powerup( drop_item, player_team )
|
||||
{
|
||||
location = drop_item.origin;
|
||||
playfx( drop_item.fx, location );
|
||||
level thread maps/mp/zombies/_zm_powerups::nuke_flash( player_team );
|
||||
wait 0.5;
|
||||
zombies = getaiarray( level.zombie_team );
|
||||
zombies = arraysort( zombies, location );
|
||||
zombies_nuked = [];
|
||||
i = 0;
|
||||
while ( i < zombies.size )
|
||||
{
|
||||
if ( is_true( zombies[ i ].ignore_nuke ) )
|
||||
{
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
if ( is_true( zombies[ i ].marked_for_death ) )
|
||||
{
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
if ( isdefined( zombies[ i ].nuke_damage_func ) )
|
||||
{
|
||||
zombies[ i ] thread [[ zombies[ i ].nuke_damage_func ]]();
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
if ( is_magic_bullet_shield_enabled( zombies[ i ] ) )
|
||||
{
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
zombies[ i ].marked_for_death = 1;
|
||||
//imported from bo3 _zm_powerup_nuke.gsc
|
||||
if ( !zombies[ i ].nuked && !is_magic_bullet_shield_enabled( zombies[ i ] ) )
|
||||
{
|
||||
zombies[ i ].nuked = 1;
|
||||
zombies_nuked[ zombies_nuked.size ] = zombies[ i ];
|
||||
}
|
||||
i++;
|
||||
}
|
||||
i = 0;
|
||||
while ( i < zombies_nuked.size )
|
||||
{
|
||||
if ( !isdefined( zombies_nuked[ i ] ) )
|
||||
{
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
if ( is_magic_bullet_shield_enabled( zombies_nuked[ i ] ) )
|
||||
{
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
if ( i < 5 && !zombies_nuked[ i ].isdog )
|
||||
{
|
||||
zombies_nuked[ i ] thread maps/mp/animscripts/zm_death::flame_death_fx();
|
||||
}
|
||||
if ( !zombies_nuked[ i ].isdog )
|
||||
{
|
||||
if ( !is_true( zombies_nuked[ i ].no_gib ) )
|
||||
{
|
||||
zombies_nuked[ i ] maps/mp/zombies/_zm_spawner::zombie_head_gib();
|
||||
}
|
||||
zombies_nuked[ i ] playsound("evt_nuked");
|
||||
}
|
||||
zombies_nuked[ i ] dodamage(zombies_nuked[i].health + 666, zombies_nuked[ i ].origin );
|
||||
i++;
|
||||
}
|
||||
players = get_players( player_team );
|
||||
for ( i = 0; i < players.size; i++ )
|
||||
{
|
||||
players[ i ] maps/mp/zombies/_zm_score::player_add_points( "nuke_powerup", 400 );
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user