1
0
mirror of https://github.com/JezuzLizard/BO2-Reimagined.git synced 2025-06-07 21:59:49 -05:00

Move weapon ammo changes to weapon files

Encounter: move upgraded starting weapon ammo change to zgrief_reimagined
This commit is contained in:
Jbleezy 2023-12-15 01:07:50 -08:00
parent f3b1ac3b84
commit ac6d7a8634
17 changed files with 63 additions and 57 deletions

View File

@ -136,7 +136,7 @@
* Upgraded: decreased stock ammo from 600 to 450
### B23R
* Changed weapon cost to 900 on all maps
* Decreased weapon cost from 1000 to 900 on all maps
### Ballistic Knife
* Projectiles are no longer picked up by other players
@ -146,6 +146,10 @@
### Executioner
* Increased penetration
### Five-seven Dual Wield
* Decreased stock ammo from 225 to 210 on all maps
* Upgraded: decreased stock ammo from 295 to 280 on all maps
### HAMR
* Decreased recoil
@ -169,7 +173,7 @@
* Decreased recoil
### Remington 870
* Changed weapon cost to 1200 on all maps
* Changed weapon cost from 900 or 1500 to 1200 on all maps
* Increased penetration
### RPD
@ -798,7 +802,7 @@
* Landing on top of an enemy player that is prone downs them
* Increased max radius for landing on top of an enemy player by 16.66%
* Decreased max height for landing on top of an enemy player by 50%
* M1911 upgraded: decreased stock ammo from 50 to 24
* Starting weapon (upgraded): decreased stock ammo by half
* Max Ammo: decreased amount of ammo given from max stock to one clip
* Max Ammo: unloads clip of all enemy players' weapons and takes away their grenades and claymores
* Double Points: decreased duration from 30 seconds to 15 seconds

View File

@ -2619,54 +2619,6 @@ disable_carpenter()
arrayremovevalue(level.zombie_powerup_array, "carpenter");
}
change_weapon_ammo(weapon)
{
max_ammo = 0;
if (isSubStr(weapon, "m1911"))
{
if (is_weapon_upgraded(weapon))
{
if (level.scr_zm_ui_gametype == "zgrief")
{
max_ammo = 24;
}
else
{
max_ammo = 48;
}
}
}
else if (isSubStr(weapon, "an94"))
{
if (is_weapon_upgraded(weapon))
{
max_ammo = 450;
}
}
else if (isSubStr(weapon, "mp44"))
{
if (is_weapon_upgraded(weapon))
{
max_ammo = 300;
}
}
else if (isSubStr(weapon, "slipgun"))
{
max_ammo = 20;
}
if (max_ammo == 0)
{
return;
}
if (self getWeaponAmmoStock(weapon) > max_ammo)
{
self setWeaponAmmoStock(weapon, max_ammo);
}
}
wallbuy_location_changes()
{
if(!is_classic())

View File

@ -1226,7 +1226,7 @@ wait_for_player_to_take( player, weapon, packa_timer, upgrade_as_attachment )
{
player giveweapon( upgrade_weapon, 0, player maps\mp\zombies\_zm_weapons::get_pack_a_punch_weapon_options( upgrade_weapon ) );
player givestartammo( upgrade_weapon );
player scripts\zm\_zm_reimagined::change_weapon_ammo(upgrade_weapon);
player notify("weapon_ammo_change");
}
player switchtoweapon( upgrade_weapon );

View File

@ -363,11 +363,12 @@ full_ammo_powerup( drop_item, player )
{
players[i] givemaxammo(primary_weapons[x]);
}
players[i] scripts\zm\_zm_reimagined::change_weapon_ammo(primary_weapons[x]);
}
x++;
}
players[i] notify("weapon_ammo_change");
i++;
}
level thread full_ammo_on_hud( drop_item, player.team );

View File

@ -466,7 +466,7 @@ weapon_give( weapon, is_upgrade, magic_box, nosound )
}
self play_weapon_vo( weapon, magic_box );
self scripts\zm\_zm_reimagined::change_weapon_ammo(weapon);
self notify("weapon_ammo_change");
}
ammo_give( weapon )
@ -519,7 +519,7 @@ ammo_give( weapon )
self setWeaponAmmoClip( alt_weap, weaponClipSize(alt_weap) );
}
self scripts\zm\_zm_reimagined::change_weapon_ammo(weapon);
self notify("weapon_ammo_change");
return true;
}

View File

@ -546,6 +546,7 @@ grief_onplayerconnect()
self thread head_icon();
self thread obj_waypoint();
self thread headstomp_watcher();
self thread decrease_upgraded_start_weapon_ammo();
self thread maps\mp\gametypes_zm\zmeat::create_item_meat_watcher();
self.killsconfirmed = 0;
self.killsdenied = 0;
@ -962,6 +963,36 @@ headstomp_watcher()
}
}
decrease_upgraded_start_weapon_ammo()
{
self endon("disconnect");
flag_wait("initial_blackscreen_passed");
upgraded_start_weapon = level.zombie_weapons[level.start_weapon].upgrade_name;
max_ammo = int(weaponmaxammo(upgraded_start_weapon) / 2);
while (1)
{
self waittill("weapon_ammo_change");
foreach (weapon in self getweaponslistprimaries())
{
if (weapon != upgraded_start_weapon)
{
continue;
}
ammo = self getweaponammostock(weapon);
if (ammo > max_ammo)
{
self setweaponammostock(weapon, max_ammo);
}
}
}
}
round_start_wait(time, initial)
{
level endon("end_game");

View File

@ -215,7 +215,6 @@ onbuyweapon_slipgun( player )
{
player givestartammo( self.stub.weaponname );
player switchtoweapon( self.stub.weaponname );
player scripts\zm\_zm_reimagined::change_weapon_ammo(self.stub.weaponname);
level notify( "slipgun_bought", player );
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
weapons/zm/slipgun_zm Normal file

File diff suppressed because one or more lines are too long