mirror of
https://github.com/JezuzLizard/BO2-Reimagined.git
synced 2025-06-11 23:57:59 -05:00
Melee weapons: fix second world model showing while meleeing
This commit is contained in:
@ -214,6 +214,8 @@ on_player_spawned()
|
|||||||
|
|
||||||
self thread ignoreme_after_revived();
|
self thread ignoreme_after_revived();
|
||||||
|
|
||||||
|
self thread held_melee_weapon_world_model_fix();
|
||||||
|
|
||||||
self thread fall_velocity_check();
|
self thread fall_velocity_check();
|
||||||
|
|
||||||
self thread give_additional_perks();
|
self thread give_additional_perks();
|
||||||
@ -1544,6 +1546,49 @@ player_revive_protection_timeout()
|
|||||||
self.revive_protection = 0;
|
self.revive_protection = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
held_melee_weapon_world_model_fix()
|
||||||
|
{
|
||||||
|
self endon("disconnect");
|
||||||
|
|
||||||
|
while (1)
|
||||||
|
{
|
||||||
|
melee_weapon = self get_player_melee_weapon();
|
||||||
|
current_weapon = self getcurrentweapon();
|
||||||
|
|
||||||
|
if (getweaponmodel(melee_weapon) == "t6_wpn_none_world")
|
||||||
|
{
|
||||||
|
wait 0.05;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (current_weapon == "held_" + melee_weapon && self hasweapon(melee_weapon))
|
||||||
|
{
|
||||||
|
self takeweapon(melee_weapon);
|
||||||
|
|
||||||
|
if (is_held_melee_weapon_offhand_melee(melee_weapon))
|
||||||
|
{
|
||||||
|
self giveweapon("held_" + melee_weapon + "_offhand");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (current_weapon != "held_" + melee_weapon && !self hasweapon(melee_weapon))
|
||||||
|
{
|
||||||
|
self giveweapon(melee_weapon);
|
||||||
|
|
||||||
|
if (is_held_melee_weapon_offhand_melee(melee_weapon))
|
||||||
|
{
|
||||||
|
self takeweapon("held_" + melee_weapon + "_offhand");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
wait 0.05;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
is_held_melee_weapon_offhand_melee(weaponname)
|
||||||
|
{
|
||||||
|
return weaponname == "tazer_knuckles_zm";
|
||||||
|
}
|
||||||
|
|
||||||
fall_velocity_check()
|
fall_velocity_check()
|
||||||
{
|
{
|
||||||
self endon("disconnect");
|
self endon("disconnect");
|
||||||
|
@ -9,6 +9,12 @@ init(weapon_name, flourish_weapon_name, ballistic_weapon_name, ballistic_upgrade
|
|||||||
precacheitem(weapon_name);
|
precacheitem(weapon_name);
|
||||||
precacheitem(flourish_weapon_name);
|
precacheitem(flourish_weapon_name);
|
||||||
precacheitem("held_" + weapon_name);
|
precacheitem("held_" + weapon_name);
|
||||||
|
|
||||||
|
if (scripts\zm\_zm_reimagined::is_held_melee_weapon_offhand_melee(weapon_name))
|
||||||
|
{
|
||||||
|
precacheitem("held_" + weapon_name + "_offhand");
|
||||||
|
}
|
||||||
|
|
||||||
add_melee_weapon(weapon_name, flourish_weapon_name, ballistic_weapon_name, ballistic_upgraded_weapon_name, cost, wallbuy_targetname, hint_string, vo_dialog_id, flourish_fn);
|
add_melee_weapon(weapon_name, flourish_weapon_name, ballistic_weapon_name, ballistic_upgraded_weapon_name, cost, wallbuy_targetname, hint_string, vo_dialog_id, flourish_fn);
|
||||||
melee_weapon_triggers = getentarray(wallbuy_targetname, "targetname");
|
melee_weapon_triggers = getentarray(wallbuy_targetname, "targetname");
|
||||||
|
|
||||||
|
1
weapons/zm/held_tazer_knuckles_zm_offhand
Normal file
1
weapons/zm/held_tazer_knuckles_zm_offhand
Normal file
File diff suppressed because one or more lines are too long
@ -1,6 +1,7 @@
|
|||||||
weapon,zm/held_knife_zm
|
weapon,zm/held_knife_zm
|
||||||
weapon,zm/held_bowie_knife_zm
|
weapon,zm/held_bowie_knife_zm
|
||||||
weapon,zm/held_tazer_knuckles_zm
|
weapon,zm/held_tazer_knuckles_zm
|
||||||
|
weapon,zm/held_tazer_knuckles_zm_offhand
|
||||||
|
|
||||||
weapon,zm/held_knife_zm_alcatraz
|
weapon,zm/held_knife_zm_alcatraz
|
||||||
weapon,zm/held_spoon_zm_alcatraz
|
weapon,zm/held_spoon_zm_alcatraz
|
||||||
|
Reference in New Issue
Block a user