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

Fix projectile angles of projectile weapons with no rotation

This commit is contained in:
Jbleezy 2024-04-16 21:08:05 -07:00
parent ed35b59f37
commit 4bd4a0d75f
6 changed files with 39 additions and 3 deletions

View File

@ -282,6 +282,7 @@
* Switch to melee weapon by pressing the Melee Weapon button (same button as Time Bomb and Maxis Drone)
* Added proper melee swing sound to all melee weapons
* Fixed world model position of certain melee weapons
* Fixed projectile angles of certain grenades and projectile weapons
* Grenades: improved projectile upward speed
* Grenades: can no longer be thrown faster than intended by throwing a grenade right after throwing one
* Grenades: changed damage scalar to 25 multiplied by round number (normally random number between 100 and 200 added by round number)

View File

@ -1904,6 +1904,11 @@ grenade_fire_watcher()
{
self thread temp_disable_offhand_weapons();
}
if (isdefined(level.headchopper_name) && weapname == level.headchopper_name)
{
grenade.angles = (0, grenade.angles[1], 0);
}
}
}

View File

@ -147,6 +147,7 @@ betty_watch()
if (weapname == "bouncingbetty_zm")
{
betty.angles = (0, betty.angles[1], 0);
betty.owner = self;
betty.team = self.team;
self notify("zmb_enable_betty_prompt");

View File

@ -9,6 +9,33 @@
#using_animtree("zombie_beacon");
player_handle_beacon()
{
self notify("starting_beacon_watch");
self endon("disconnect");
self endon("starting_beacon_watch");
attract_dist_diff = level.beacon_attract_dist_diff;
if (!isdefined(attract_dist_diff))
attract_dist_diff = 45;
num_attractors = level.num_beacon_attractors;
if (!isdefined(num_attractors))
num_attractors = 96;
max_attract_dist = level.beacon_attract_dist;
if (!isdefined(max_attract_dist))
max_attract_dist = 1536;
while (true)
{
grenade = get_thrown_beacon();
self thread player_throw_beacon(grenade, num_attractors, max_attract_dist, attract_dist_diff);
}
}
player_throw_beacon(grenade, num_attractors, max_attract_dist, attract_dist_diff)
{
self endon("disconnect");
@ -27,13 +54,14 @@ player_throw_beacon(grenade, num_attractors, max_attract_dist, attract_dist_diff
return;
}
grenade.angles = (0, grenade.angles[1], 0);
grenade hide();
model = spawn("script_model", grenade.origin);
model.angles = grenade.angles;
model endon("weapon_beacon_timeout");
model setmodel("t6_wpn_zmb_homing_beacon_world");
model useanimtree(#animtree);
model linkto(grenade);
model.angles = grenade.angles;
model thread beacon_cleanup(grenade);
model.owner = self;
clone = undefined;

View File

@ -65,12 +65,13 @@ player_throw_cymbal_monkey(grenade, num_attractors, max_attract_dist, attract_di
return;
}
grenade.angles = (0, grenade.angles[1], 0);
grenade hide();
model = spawn("script_model", grenade.origin);
model.angles = grenade.angles;
model setmodel(level.cymbal_monkey_model);
model useanimtree(#animtree);
model linkto(grenade);
model.angles = grenade.angles;
model thread monkey_cleanup(grenade);
clone = undefined;

View File

@ -59,7 +59,7 @@ main()
replaceFunc(maps\mp\zombies\_zm_weap_riotshield_tomb::init, scripts\zm\replaced\_zm_weap_riotshield_tomb::init);
replaceFunc(maps\mp\zombies\_zm_weap_riotshield_tomb::player_damage_shield, scripts\zm\replaced\_zm_weap_riotshield_tomb::player_damage_shield);
replaceFunc(maps\mp\zombies\_zm_weap_one_inch_punch::one_inch_punch_melee_attack, scripts\zm\replaced\_zm_weap_one_inch_punch::one_inch_punch_melee_attack);
replaceFunc(maps\mp\zombies\_zm_weap_beacon::player_throw_beacon, scripts\zm\replaced\_zm_weap_beacon::player_throw_beacon);
replaceFunc(maps\mp\zombies\_zm_weap_beacon::player_handle_beacon, scripts\zm\replaced\_zm_weap_beacon::player_handle_beacon);
replaceFunc(maps\mp\zombies\_zm_weap_beacon::wait_and_do_weapon_beacon_damage, scripts\zm\replaced\_zm_weap_beacon::wait_and_do_weapon_beacon_damage);
replaceFunc(maps\mp\zombies\_zm_weap_staff_air::whirlwind_kill_zombies, scripts\zm\replaced\_zm_weap_staff_air::whirlwind_kill_zombies);
replaceFunc(maps\mp\zombies\_zm_weap_staff_fire::flame_damage_fx, scripts\zm\replaced\_zm_weap_staff_fire::flame_damage_fx);