mirror of
https://github.com/JezuzLizard/BO2-Reimagined.git
synced 2025-06-10 07:08:06 -05:00
Nuke kills all zombies instantly
This commit is contained in:
@ -136,6 +136,9 @@
|
||||
### Carpenter
|
||||
* Removed
|
||||
|
||||
### Nuke
|
||||
* Kills all zombies instantly
|
||||
|
||||
## Persistent Upgrades
|
||||
* Removed
|
||||
|
||||
|
@ -7,6 +7,7 @@ main()
|
||||
{
|
||||
replaceFunc(maps/mp/zombies/_zm_playerhealth::playerhealthregen, ::playerhealthregen);
|
||||
replaceFunc(maps/mp/zombies/_zm_utility::track_players_intersection_tracker, ::track_players_intersection_tracker);
|
||||
replaceFunc(maps/mp/zombies/_zm_powerups::nuke_powerup, ::nuke_powerup);
|
||||
}
|
||||
|
||||
init()
|
||||
@ -1773,6 +1774,83 @@ random_push()
|
||||
self SetVelocity(vector);
|
||||
}
|
||||
|
||||
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 );
|
||||
}
|
||||
}
|
||||
|
||||
setscoreboardcolumns_gametype()
|
||||
{
|
||||
if(getDvar("g_gametype") == "zgrief")
|
||||
|
Reference in New Issue
Block a user