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

One Inch Punch: add held weapon

This commit is contained in:
Jbleezy 2023-12-23 05:08:30 -08:00
parent cfd156706c
commit 4851970a9a
18 changed files with 161 additions and 1 deletions

View File

@ -23,6 +23,24 @@ LANG_ENGLISH "Silver Spoon"
REFERENCE ZMWEAPON_SPORK
LANG_ENGLISH "Golden Spork"
REFERENCE ZMWEAPON_ONE_INCH_PUNCH
LANG_ENGLISH "One Inch Punch"
REFERENCE ZMWEAPON_ONE_INCH_PUNCH_UPGRADED
LANG_ENGLISH "Fists of Iron"
REFERENCE ZMWEAPON_ONE_INCH_PUNCH_AIR
LANG_ENGLISH "Fists of Air"
REFERENCE ZMWEAPON_ONE_INCH_PUNCH_FIRE
LANG_ENGLISH "Fists of Fire"
REFERENCE ZMWEAPON_ONE_INCH_PUNCH_ICE
LANG_ENGLISH "Fists of Ice"
REFERENCE ZMWEAPON_ONE_INCH_PUNCH_LIGHTNING
LANG_ENGLISH "Fists of Lightning"
REFERENCE ZOMBIE_EQUIP_TURBINE
LANG_ENGLISH "Turbine"

BIN
images/hud_obit_cobra.iwi Normal file

Binary file not shown.

BIN
images/hud_obit_crate.iwi Normal file

Binary file not shown.

BIN
images/hud_obit_pegasus.iwi Normal file

Binary file not shown.

BIN
images/hud_obit_talon.iwi Normal file

Binary file not shown.

BIN
images/hud_obit_thawk.iwi Normal file

Binary file not shown.

BIN
images/hud_obit_warthog.iwi Normal file

Binary file not shown.

View File

@ -2630,6 +2630,27 @@ weapon_changes()
include_weapon( "held_spork_zm_alcatraz", 0 );
register_melee_weapon_for_level( "held_spork_zm_alcatraz" );
}
if (level.script == "zm_tomb")
{
include_weapon( "held_one_inch_punch_zm", 0 );
register_melee_weapon_for_level( "held_one_inch_punch_zm" );
include_weapon( "held_one_inch_punch_upgraded_zm", 0 );
register_melee_weapon_for_level( "held_one_inch_punch_upgraded_zm" );
include_weapon( "held_one_inch_punch_air_zm", 0 );
register_melee_weapon_for_level( "held_one_inch_punch_air_zm" );
include_weapon( "held_one_inch_punch_fire_zm", 0 );
register_melee_weapon_for_level( "held_one_inch_punch_fire_zm" );
include_weapon( "held_one_inch_punch_ice_zm", 0 );
register_melee_weapon_for_level( "held_one_inch_punch_ice_zm" );
include_weapon( "held_one_inch_punch_lightning_zm", 0 );
register_melee_weapon_for_level( "held_one_inch_punch_lightning_zm" );
}
}
wallbuy_location_changes()

View File

@ -11,6 +11,85 @@
#include maps\mp\zombies\_zm_weap_staff_lightning;
#include maps\mp\animscripts\zm_shared;
one_inch_punch_melee_attack()
{
self endon( "disconnect" );
self endon( "stop_one_inch_punch_attack" );
if ( !( isdefined( self.one_inch_punch_flag_has_been_init ) && self.one_inch_punch_flag_has_been_init ) )
self ent_flag_init( "melee_punch_cooldown" );
self.one_inch_punch_flag_has_been_init = 1;
current_melee_weapon = self get_player_melee_weapon();
self takeweapon( current_melee_weapon );
if ( isdefined( self.b_punch_upgraded ) && self.b_punch_upgraded )
{
str_weapon = self getcurrentweapon();
self disable_player_move_states( 1 );
self giveweapon( "zombie_one_inch_punch_upgrade_flourish" );
self switchtoweapon( "zombie_one_inch_punch_upgrade_flourish" );
self waittill_any( "player_downed", "weapon_change_complete" );
self switchtoweapon( str_weapon );
self enable_player_move_states();
self takeweapon( "zombie_one_inch_punch_upgrade_flourish" );
if ( self.str_punch_element == "air" )
{
self giveweapon( "one_inch_punch_air_zm" );
self set_player_melee_weapon( "one_inch_punch_air_zm" );
self giveweapon( "held_one_inch_punch_air_zm" );
self setactionslot( 2, "weapon", "one_inch_punch_air_zm" );
}
else if ( self.str_punch_element == "fire" )
{
self giveweapon( "one_inch_punch_fire_zm" );
self set_player_melee_weapon( "one_inch_punch_fire_zm" );
self giveweapon( "held_one_inch_punch_fire_zm" );
self setactionslot( 2, "weapon", "held_one_inch_punch_fire_zm" );
}
else if ( self.str_punch_element == "ice" )
{
self giveweapon( "one_inch_punch_ice_zm" );
self set_player_melee_weapon( "one_inch_punch_ice_zm" );
self giveweapon( "held_one_inch_punch_ice_zm" );
self setactionslot( 2, "weapon", "held_one_inch_punch_ice_zm" );
}
else if ( self.str_punch_element == "lightning" )
{
self giveweapon( "one_inch_punch_lightning_zm" );
self set_player_melee_weapon( "one_inch_punch_lightning_zm" );
self giveweapon( "held_inch_punch_lightning_zm" );
self setactionslot( 2, "weapon", "held_inch_punch_lightning_zm" );
}
else
{
self giveweapon( "one_inch_punch_upgraded_zm" );
self set_player_melee_weapon( "one_inch_punch_upgraded_zm" );
self giveweapon( "held_one_inch_punch_upgraded_zm" );
self setactionslot( 2, "weapon", "held_one_inch_punch_upgraded_zm" );
}
}
else
{
str_weapon = self getcurrentweapon();
self disable_player_move_states( 1 );
self giveweapon( "zombie_one_inch_punch_flourish" );
self switchtoweapon( "zombie_one_inch_punch_flourish" );
self waittill_any( "player_downed", "weapon_change_complete" );
self switchtoweapon( str_weapon );
self enable_player_move_states();
self takeweapon( "zombie_one_inch_punch_flourish" );
self giveweapon( "one_inch_punch_zm" );
self set_player_melee_weapon( "one_inch_punch_zm" );
self giveweapon( "held_one_inch_punch_zm" );
self setactionslot( 2, "weapon", "held_one_inch_punch_zm" );
self thread maps\mp\zombies\_zm_audio::create_and_play_dialog( "perk", "one_inch" );
}
self thread monitor_melee_swipe();
}
monitor_melee_swipe()
{
self endon("disconnect");

View File

@ -53,7 +53,7 @@ main()
replaceFunc(maps\mp\zombies\_zm_riotshield_tomb::trackriotshield, scripts\zm\replaced\_zm_riotshield_tomb::trackriotshield);
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::monitor_melee_swipe, scripts\zm\replaced\_zm_weap_one_inch_punch::monitor_melee_swipe);
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::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);

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

View File

@ -0,0 +1,35 @@
weapon,zm/held_one_inch_punch_zm
weapon,zm/held_one_inch_punch_upgraded_zm
weapon,zm/held_one_inch_punch_air_zm
weapon,zm/held_one_inch_punch_fire_zm
weapon,zm/held_one_inch_punch_ice_zm
weapon,zm/held_one_inch_punch_lightning_zm
xanim,viewmodel_zomb_meat_idle
xanim,viewmodel_zomb_meat_pullout
xanim,viewmodel_zomb_meat_putaway
xanim,viewmodel_zomb_meat_sprint_in
xanim,viewmodel_zomb_meat_sprint_loop
xanim,viewmodel_zomb_meat_sprint_out
xanim,viewmodel_zomb_meat_crawl_in
xanim,viewmodel_zomb_meat_crawl_forward
xanim,viewmodel_zomb_meat_crawl_back
xanim,viewmodel_zomb_meat_crawl_right
xanim,viewmodel_zomb_meat_crawl_left
xanim,viewmodel_zomb_meat_crawl_out
xanim,viewmodel_zomb_meat_ads_up
xanim,viewmodel_zomb_meat_ads_down
xanim,viewmodel_zomb_meat_d2p_in
xanim,viewmodel_zomb_meat_d2p_loop
xanim,viewmodel_zomb_meat_d2p_out
material,hud_obit_pegasus
material,hud_obit_warthog
material,hud_obit_talon
material,hud_obit_thawk
material,hud_obit_crate
material,hud_obit_cobra
image,hud_obit_pegasus
image,hud_obit_warthog
image,hud_obit_talon
image,hud_obit_thawk
image,hud_obit_crate
image,hud_obit_cobra

View File

@ -6,6 +6,7 @@ include,knife_ballistic_zm
include,ray_gun_zm
include,held_knife_zm
include,held_one_inch_punch_zm
include,fnp45_zm
localize,reimagined