mirror of
https://github.com/JezuzLizard/BO2-Reimagined.git
synced 2025-06-12 08:08:00 -05:00
Dual wield last stand weapon is switched to when ammo is only in left clip
This commit is contained in:
@ -69,6 +69,7 @@
|
|||||||
* Barriers can no longer be rebuilt while sprinting or thowing a grenade
|
* Barriers can no longer be rebuilt while sprinting or thowing a grenade
|
||||||
* Entering and exiting last stand no longer refills last stand weapon clip automatically
|
* Entering and exiting last stand no longer refills last stand weapon clip automatically
|
||||||
* Upgraded weapon camo is applied in last stand
|
* Upgraded weapon camo is applied in last stand
|
||||||
|
* Dual wield last stand weapon is switched to when ammo is only in left clip
|
||||||
* Decreased friendly player name fade out time from 1.5 seconds to 0.25 seconds
|
* Decreased friendly player name fade out time from 1.5 seconds to 0.25 seconds
|
||||||
* Removed enemy player name fade in time
|
* Removed enemy player name fade in time
|
||||||
* Added icons on scoreboard when player is downed, bled out, in Who's Who mode, or in afterlife
|
* Added icons on scoreboard when player is downed, bled out, in Who's Who mode, or in afterlife
|
||||||
|
@ -47,6 +47,7 @@ main()
|
|||||||
replaceFunc(maps\mp\zombies\_zm::ai_calculate_health, scripts\zm\replaced\_zm::ai_calculate_health);
|
replaceFunc(maps\mp\zombies\_zm::ai_calculate_health, scripts\zm\replaced\_zm::ai_calculate_health);
|
||||||
replaceFunc(maps\mp\zombies\_zm::onallplayersready, scripts\zm\replaced\_zm::onallplayersready);
|
replaceFunc(maps\mp\zombies\_zm::onallplayersready, scripts\zm\replaced\_zm::onallplayersready);
|
||||||
replaceFunc(maps\mp\zombies\_zm::last_stand_pistol_rank_init, scripts\zm\replaced\_zm::last_stand_pistol_rank_init);
|
replaceFunc(maps\mp\zombies\_zm::last_stand_pistol_rank_init, scripts\zm\replaced\_zm::last_stand_pistol_rank_init);
|
||||||
|
replaceFunc(maps\mp\zombies\_zm::last_stand_best_pistol, scripts\zm\replaced\_zm::last_stand_best_pistol);
|
||||||
replaceFunc(maps\mp\zombies\_zm::can_track_ammo, scripts\zm\replaced\_zm::can_track_ammo);
|
replaceFunc(maps\mp\zombies\_zm::can_track_ammo, scripts\zm\replaced\_zm::can_track_ammo);
|
||||||
replaceFunc(maps\mp\zombies\_zm::take_additionalprimaryweapon, scripts\zm\replaced\_zm::take_additionalprimaryweapon);
|
replaceFunc(maps\mp\zombies\_zm::take_additionalprimaryweapon, scripts\zm\replaced\_zm::take_additionalprimaryweapon);
|
||||||
replaceFunc(maps\mp\zombies\_zm::check_for_valid_spawn_near_team, scripts\zm\replaced\_zm::check_for_valid_spawn_near_team);
|
replaceFunc(maps\mp\zombies\_zm::check_for_valid_spawn_near_team, scripts\zm\replaced\_zm::check_for_valid_spawn_near_team);
|
||||||
|
@ -907,6 +907,53 @@ last_stand_pistol_rank_init()
|
|||||||
level.pistol_values[ level.pistol_values.size ] = "microwavegundw_upgraded_zm";
|
level.pistol_values[ level.pistol_values.size ] = "microwavegundw_upgraded_zm";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
last_stand_best_pistol()
|
||||||
|
{
|
||||||
|
pistol_array = [];
|
||||||
|
current_weapons = self getweaponslistprimaries();
|
||||||
|
|
||||||
|
for ( i = 0; i < current_weapons.size; i++ )
|
||||||
|
{
|
||||||
|
class = weaponclass( current_weapons[i] );
|
||||||
|
|
||||||
|
if ( issubstr( current_weapons[i], "knife_ballistic_" ) )
|
||||||
|
class = "knife";
|
||||||
|
|
||||||
|
if ( class == "pistol" || class == "pistolspread" || class == "pistol spread" )
|
||||||
|
{
|
||||||
|
if ( current_weapons[i] != level.default_laststandpistol && !flag( "solo_game" ) || !flag( "solo_game" ) && current_weapons[i] != level.default_solo_laststandpistol )
|
||||||
|
{
|
||||||
|
ammo_count = self getammocount( current_weapons[i] );
|
||||||
|
|
||||||
|
dual_wield_name = weapondualwieldweaponname( current_weapons[i] );
|
||||||
|
if ( dual_wield_name != "none" )
|
||||||
|
{
|
||||||
|
ammo_count += self getweaponammoclip( dual_wield_name );
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( ammo_count <= 0 )
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
pistol_array_index = pistol_array.size;
|
||||||
|
pistol_array[pistol_array_index] = spawnstruct();
|
||||||
|
pistol_array[pistol_array_index].gun = current_weapons[i];
|
||||||
|
pistol_array[pistol_array_index].value = 0;
|
||||||
|
|
||||||
|
for ( j = 0; j < level.pistol_values.size; j++ )
|
||||||
|
{
|
||||||
|
if ( level.pistol_values[j] == current_weapons[i] )
|
||||||
|
{
|
||||||
|
pistol_array[pistol_array_index].value = j;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
self.laststandpistol = last_stand_compare_pistols( pistol_array );
|
||||||
|
}
|
||||||
|
|
||||||
can_track_ammo( weap )
|
can_track_ammo( weap )
|
||||||
{
|
{
|
||||||
if ( !isdefined( weap ) )
|
if ( !isdefined( weap ) )
|
||||||
|
Reference in New Issue
Block a user