Skip to content

Commit 6d78d23

Browse files
authored
Merge pull request #2284 from HDR-Development/smashline-2-fixes
Smashline 2 Fixes
2 parents e683c7c + fd53044 commit 6d78d23

File tree

18 files changed

+64
-54
lines changed

18 files changed

+64
-54
lines changed

fighters/buddy/src/opff.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ unsafe fn blue_eggs_land_cancels(fighter: &mut L2CFighterCommon) {
2323
// 11F of landing lag plus one extra frame to subtract from the FAF to actually get that amount of lag
2424
let landing_lag = 12.0;
2525
if MotionModule::frame(fighter.module_accessor) < (special_n_fire_cancel_frame_ground - landing_lag) {
26-
MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_n"), 49.0 - landing_lag, 1.0, 0.0, false, false);
26+
MotionModule::set_frame_sync_anim_cmd(fighter.module_accessor, 49.0 - landing_lag, true, true, false);
2727
}
2828
LANDING_EFFECT(fighter, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false);
2929
//fighter.change_status_req(*FIGHTER_STATUS_KIND_LANDING, false);

fighters/common/src/general_statuses/airdodge.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ use globals::*;
66

77
pub fn install() {
88
skyline::nro::add_hook(nro_hook);
9-
Agent::new("fighter")
10-
.status(Pre, *FIGHTER_STATUS_KIND_ESCAPE_AIR, status_pre_EscapeAir)
11-
.status(Main, *FIGHTER_STATUS_KIND_ESCAPE_AIR, status_EscapeAir)
12-
.status(End, *FIGHTER_STATUS_KIND_ESCAPE_AIR, status_end_EscapeAir)
13-
.install();
9+
// Agent::new("fighter")
10+
// .status(Pre, *FIGHTER_STATUS_KIND_ESCAPE_AIR, status_pre_EscapeAir)
11+
// .status(Main, *FIGHTER_STATUS_KIND_ESCAPE_AIR, status_EscapeAir)
12+
// .status(End, *FIGHTER_STATUS_KIND_ESCAPE_AIR, status_end_EscapeAir)
13+
// .install();
1414
}
1515

1616
fn nro_hook(info: &skyline::nro::NroInfo) {
@@ -152,9 +152,9 @@ pub unsafe fn status_end_EscapeAir(fighter: &mut L2CFighterCommon) -> L2CValue {
152152
WorkModule::on_flag(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_FLAG_DISABLE_LANDING_TURN);
153153
WorkModule::on_flag(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_FLAG_ENABLE_LANDING_CLIFF_STOP);
154154
}
155-
VarModule::off_flag(fighter.battle_object, vars::common::status::SHOULD_WAVELAND);
156-
VarModule::off_flag(fighter.battle_object, vars::common::instance::PERFECT_WAVEDASH);
157155
}
156+
VarModule::off_flag(fighter.battle_object, vars::common::status::SHOULD_WAVELAND);
157+
VarModule::off_flag(fighter.battle_object, vars::common::instance::PERFECT_WAVEDASH);
158158
VarModule::on_flag(fighter.battle_object, vars::common::instance::ENABLE_AIR_ESCAPE_MAGNET);
159159
0.into()
160160
}

fighters/common/src/general_statuses/attack/attackdash.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ fn nro_hook(info: &skyline::nro::NroInfo) {
1414
}
1515
pub fn install() {
1616
skyline::nro::add_hook(nro_hook);
17-
Agent::new("fighter")
18-
.status(Main, *FIGHTER_STATUS_KIND_ATTACK_DASH, status_AttackDash)
19-
.install();
17+
// Agent::new("fighter")
18+
// .status(Main, *FIGHTER_STATUS_KIND_ATTACK_DASH, status_AttackDash)
19+
// .install();
2020
}
2121

2222
#[skyline::hook(replace = L2CFighterCommon_status_pre_AttackDash)]

fighters/common/src/general_statuses/attack/attackx4.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ use globals::*;
55

66
pub fn install() {
77
skyline::nro::add_hook(nro_hook);
8-
Agent::new("fighter")
9-
.status(End, *FIGHTER_STATUS_KIND_ATTACK_HI4_START, status_end_AttackHi4Start)
10-
.status(End, *FIGHTER_STATUS_KIND_ATTACK_LW4_START, status_end_AttackLw4Start)
11-
.install();
8+
// Agent::new("fighter")
9+
// .status(End, *FIGHTER_STATUS_KIND_ATTACK_HI4_START, status_end_AttackHi4Start)
10+
// .status(End, *FIGHTER_STATUS_KIND_ATTACK_LW4_START, status_end_AttackLw4Start)
11+
// .install();
1212
}
1313

1414
fn nro_hook(info: &skyline::nro::NroInfo) {

fighters/common/src/general_statuses/damageflyreflect.rs

+8-8
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ use globals::*;
44
// This file contains code for ceiling/wall/ground bounces
55

66
pub fn install() {
7-
Agent::new("fighter")
8-
.status(End, *FIGHTER_STATUS_KIND_DAMAGE_FLY, damage_fly_end)
9-
.status(End, *FIGHTER_STATUS_KIND_DAMAGE_FLY_REFLECT_D, damage_fly_reflect_d_end)
10-
.status(End, *FIGHTER_STATUS_KIND_DAMAGE_FLY_REFLECT_JUMP_BOARD, damage_fly_reflect_jump_board_end)
11-
.status(End, *FIGHTER_STATUS_KIND_DAMAGE_FLY_REFLECT_LR, damage_fly_reflect_lr_end)
12-
.status(End, *FIGHTER_STATUS_KIND_DAMAGE_FLY_ROLL, damage_fly_roll_end)
13-
.status(End, *FIGHTER_STATUS_KIND_DAMAGE_FLY_METEOR, damage_fly_meteor_end)
14-
.install();
7+
// Agent::new("fighter")
8+
// .status(End, *FIGHTER_STATUS_KIND_DAMAGE_FLY, damage_fly_end)
9+
// .status(End, *FIGHTER_STATUS_KIND_DAMAGE_FLY_REFLECT_D, damage_fly_reflect_d_end)
10+
// .status(End, *FIGHTER_STATUS_KIND_DAMAGE_FLY_REFLECT_JUMP_BOARD, damage_fly_reflect_jump_board_end)
11+
// .status(End, *FIGHTER_STATUS_KIND_DAMAGE_FLY_REFLECT_LR, damage_fly_reflect_lr_end)
12+
// .status(End, *FIGHTER_STATUS_KIND_DAMAGE_FLY_ROLL, damage_fly_roll_end)
13+
// .status(End, *FIGHTER_STATUS_KIND_DAMAGE_FLY_METEOR, damage_fly_meteor_end)
14+
// .install();
1515
skyline::nro::add_hook(nro_hook);
1616
}
1717

fighters/common/src/general_statuses/jump.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ use globals::*;
66

77
pub fn install() {
88
skyline::nro::add_hook(nro_hook);
9-
Agent::new("fighter")
10-
.status(Main, *FIGHTER_STATUS_KIND_JUMP, status_Jump)
11-
.status(Pre, *FIGHTER_STATUS_KIND_JUMP, status_pre_Jump)
12-
.install();
9+
// Agent::new("fighter")
10+
// .status(Main, *FIGHTER_STATUS_KIND_JUMP, status_Jump)
11+
// .status(Pre, *FIGHTER_STATUS_KIND_JUMP, status_pre_Jump)
12+
// .install();
1313
}
1414

1515
fn nro_hook(info: &skyline::nro::NroInfo) {

fighters/common/src/general_statuses/jumpsquat.rs

+11-6
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ use utils::game_modes::CustomMode;
66

77
pub fn install() {
88
skyline::nro::add_hook(nro_hook);
9-
Agent::new("fighter")
10-
.status(Exec, *FIGHTER_STATUS_KIND_JUMP_SQUAT, status_exec_JumpSquat)
11-
.status(End, *FIGHTER_STATUS_KIND_JUMP_SQUAT, status_end_JumpSquat)
12-
.status(Main, *FIGHTER_STATUS_KIND_JUMP_SQUAT, status_JumpSquat)
13-
.install();
9+
// Agent::new("fighter")
10+
// .status(Exec, *FIGHTER_STATUS_KIND_JUMP_SQUAT, status_exec_JumpSquat)
11+
// .status(End, *FIGHTER_STATUS_KIND_JUMP_SQUAT, status_end_JumpSquat)
12+
// .status(Main, *FIGHTER_STATUS_KIND_JUMP_SQUAT, status_JumpSquat)
13+
// .install();
1414
}
1515

1616
fn nro_hook(info: &skyline::nro::NroInfo) {
@@ -25,6 +25,7 @@ fn nro_hook(info: &skyline::nro::NroInfo) {
2525
sub_jump_squat_uniq_check_sub_mini_attack,
2626
sub_status_JumpSquat_check_stick_lr_update,
2727
status_JumpSquat,
28+
bind_address_call_status_end_JumpSquat,
2829
status_end_JumpSquat,
2930
);
3031
}
@@ -182,7 +183,11 @@ unsafe fn status_JumpSquat_Main(fighter: &mut L2CFighterCommon) -> L2CValue {
182183
}
183184

184185
// end status stuff
185-
// no symbol since you can't call `fighter.status_end_JumpSquat()`, and replacing `bind_call_...` makes no sense here
186+
#[skyline::hook(replace = L2CFighterCommon_bind_address_call_status_end_JumpSquat)]
187+
unsafe fn bind_address_call_status_end_JumpSquat(fighter: &mut L2CFighterCommon, _agent: &mut L2CAgent) -> L2CValue {
188+
fighter.status_end_JumpSquat()
189+
}
190+
186191
#[skyline::hook(replace = L2CFighterCommon_status_end_JumpSquat)]
187192
unsafe fn status_end_JumpSquat(fighter: &mut L2CFighterCommon) -> L2CValue {
188193
InputModule::disable_persist(fighter.battle_object);

fighters/common/src/general_statuses/run.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -218,11 +218,11 @@ fn nro_info(info: &skyline::nro::NroInfo) {
218218

219219
pub fn install() {
220220
skyline::nro::add_hook(nro_info);
221-
Agent::new("fighter")
222-
.status(Pre, *FIGHTER_STATUS_KIND_RUN, status_pre_run)
223-
.status(Main, *FIGHTER_STATUS_KIND_RUN, status_run)
224-
.status(Main, *FIGHTER_STATUS_KIND_RUN_BRAKE, status_runbrake)
225-
.status(Main, *FIGHTER_STATUS_KIND_TURN_RUN_BRAKE, status_turnrunbrake)
226-
.status(Main, *FIGHTER_STATUS_KIND_TURN_RUN, status_turnrun)
227-
.install();
221+
// Agent::new("fighter")
222+
// .status(Pre, *FIGHTER_STATUS_KIND_RUN, status_pre_run)
223+
// .status(Main, *FIGHTER_STATUS_KIND_RUN, status_run)
224+
// .status(Main, *FIGHTER_STATUS_KIND_RUN_BRAKE, status_runbrake)
225+
// .status(Main, *FIGHTER_STATUS_KIND_TURN_RUN_BRAKE, status_turnrunbrake)
226+
// .status(Main, *FIGHTER_STATUS_KIND_TURN_RUN, status_turnrun)
227+
// .install();
228228
}

fighters/common/src/general_statuses/turn.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,8 @@ fn nro_hook(info: &skyline::nro::NroInfo) {
205205

206206
pub fn install() {
207207
skyline::nro::add_hook(nro_hook);
208-
Agent::new("fighter")
209-
.status(Main, *FIGHTER_STATUS_KIND_TURN, status_turn)
210-
.status(End, *FIGHTER_STATUS_KIND_TURN, status_end_turn)
211-
.install();
208+
// Agent::new("fighter")
209+
// .status(Main, *FIGHTER_STATUS_KIND_TURN, status_turn)
210+
// .status(End, *FIGHTER_STATUS_KIND_TURN, status_end_turn)
211+
// .install();
212212
}

fighters/common/src/general_statuses/walk.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ fn nro_hook(info: &skyline::nro::NroInfo) {
139139
pub fn install() {
140140
skyline::nro::add_hook(nro_hook);
141141

142-
Agent::new("fighter")
143-
.status(Pre, *FIGHTER_STATUS_KIND_WALK, status_pre_walk)
144-
.status(Main, *FIGHTER_STATUS_KIND_WALK, status_walk)
145-
.install();
142+
// Agent::new("fighter")
143+
// .status(Pre, *FIGHTER_STATUS_KIND_WALK, status_pre_walk)
144+
// .status(Main, *FIGHTER_STATUS_KIND_WALK, status_walk)
145+
// .install();
146146
}

fighters/inkling/src/opff.rs

+3
Original file line numberDiff line numberDiff line change
@@ -162,4 +162,7 @@ pub fn install() {
162162
smashline::Agent::new("inkling")
163163
.on_line(Main, inkling_frame_wrapper)
164164
.install();
165+
skyline::install_hooks!(
166+
get_ink_colors
167+
);
165168
}

fighters/koopa/src/opff.rs

-1
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@ pub unsafe fn moveset(fighter: &mut smash::lua2cpp::L2CFighterCommon, boma: &mut
150150
fireball_cooldown(boma,status_kind);
151151
koopa_ex_punch(fighter);
152152
fastfall_specials(fighter);
153-
fastfall_specials(fighter);
154153
}
155154

156155
pub extern "C" fn koopa_frame_wrapper(fighter: &mut smash::lua2cpp::L2CFighterCommon) {

fighters/lucario/src/status/attack_air.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ pub unsafe extern "C" fn attack_air_end(fighter: &mut L2CFighterCommon) -> L2CVa
1414
}
1515
VarModule::off_flag(fighter.object(), vars::lucario::instance::IS_USPECIAL_ATTACK_CANCEL);
1616
}
17-
smashline::original_status(Main, fighter, *FIGHTER_STATUS_KIND_ATTACK_AIR)(fighter)
17+
smashline::original_status(End, fighter, *FIGHTER_STATUS_KIND_ATTACK_AIR)(fighter)
1818
}
1919

2020
pub unsafe extern "C" fn attack_air_main(fighter: &mut L2CFighterCommon) -> L2CValue {

fighters/lucario/src/status/special_hi.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use globals::*;
55
// FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_HI_BOUND
66

77
pub unsafe extern "C" fn special_hi_bound_end(fighter: &mut L2CFighterCommon) -> L2CValue {
8-
let ret = smashline::original_status(Main, fighter, *FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_HI_BOUND)(fighter);
8+
let ret = smashline::original_status(End, fighter, *FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_HI_BOUND)(fighter);
99

1010
fighter.off_flag(*FIGHTER_INSTANCE_WORK_ID_FLAG_DISABLE_LANDING_CANCEL);
1111

fighters/palutena/src/opff.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ unsafe fn power_cast(fighter: &mut L2CFighterCommon) {
278278
//println!("and why he ourple");
279279
}
280280
else if color_2 == 3 {
281-
fighter.change_status(statuses::palutena::SPECIAL_N_R.into(), false.into());
281+
fighter.change_status(statuses::palutena::SPECIAL_N_G.into(), false.into());
282282
//println!("i like cash from my hair to my ass");
283283
}
284284
else {

fighters/pickel/src/status.rs

+3
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,9 @@ extern "C" fn pickel_init(fighter: &mut L2CFighterCommon) {
365365
}
366366
}
367367
pub fn install() {
368+
skyline::install_hooks!(
369+
stuff_hook
370+
);
368371
smashline::Agent::new("pickel")
369372
.status(
370373
Main,

fighters/tantan/src/status.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ unsafe extern "C" fn tantan_special_hi_exec(fighter: &mut L2CFighterCommon) -> L
261261
fighter.change_status_req(*FIGHTER_TANTAN_STATUS_KIND_SPECIAL_HI_AIR, false);
262262
return 0.into();
263263
}
264-
return smashline::original_status(Exec, fighter, *FIGHTER_STATUS_KIND_SPECIAL_HI)(fighter);
264+
return smashline::original_status(Exec, fighter, *FIGHTER_TANTAN_STATUS_KIND_SPECIAL_HI_GROUND)(fighter);
265265
}
266266

267267
unsafe extern "C" fn tantan_special_hi_air_pre(fighter: &mut L2CFighterCommon) -> L2CValue {

fighters/wolf/src/status/special_s.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ pub fn install() {
442442
.status(Main, SPECIAL_S_END, special_s_end_main)
443443
.status(End, SPECIAL_S_END, special_s_end_end)
444444
.status(Init, SPECIAL_S_END, special_s_end_init)
445-
.status(Init, SPECIAL_S_END, special_s_end_exec)
445+
.status(Exec, SPECIAL_S_END, special_s_end_exec)
446446
.on_start(wolf_init)
447447
.install();
448448
}

0 commit comments

Comments
 (0)