Skip to content

Commit 3d242a1

Browse files
committed
Rumble Fixes
1 parent b602e9c commit 3d242a1

File tree

4 files changed

+83
-2
lines changed

4 files changed

+83
-2
lines changed

fighters/sheik/src/acmd/smashes.rs

+25
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,30 @@ unsafe fn sheik_attack_hi4_effect(fighter: &mut L2CAgentBase) {
111111
}
112112
}
113113

114+
#[acmd_script( agent = "sheik", script = "expression_attackhi4" , category = ACMD_EXPRESSION , low_priority)]
115+
unsafe fn sheik_attack_hi4_expression(fighter: &mut L2CAgentBase) {
116+
let lua_state = fighter.lua_state_agent;
117+
let boma = fighter.boma();
118+
if is_excute(fighter) {
119+
slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR);
120+
}
121+
frame(lua_state, 7.0);
122+
sv_animcmd::execute(lua_state, 7.0);
123+
if WorkModule::is_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_SMASH_SMASH_HOLD_TO_ATTACK) {
124+
if is_excute(fighter) {
125+
slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR);
126+
}
127+
}
128+
frame(lua_state, 8.0);
129+
if is_excute(fighter) {
130+
ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32);
131+
}
132+
frame(lua_state, 10.0);
133+
if is_excute(fighter) {
134+
RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0);
135+
}
136+
}
137+
114138
#[acmd_script( agent = "sheik", script = "game_attacklw4" , category = ACMD_GAME , low_priority)]
115139
unsafe fn sheik_attack_lw4_game(fighter: &mut L2CAgentBase) {
116140
let lua_state = fighter.lua_state_agent;
@@ -157,6 +181,7 @@ pub fn install() {
157181
sheik_attack_s4_s_game,
158182
sheik_attack_hi4_game,
159183
sheik_attack_hi4_effect,
184+
sheik_attack_hi4_expression,
160185
sheik_attack_lw4_game,
161186
);
162187
}

fighters/sonic/src/acmd/aerials.rs

+19
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,24 @@ unsafe fn sonic_attack_air_hi_effect(fighter: &mut L2CAgentBase) {
250250

251251
}
252252

253+
#[acmd_script( agent = "sonic", script = "expression_attackairhi" , category = ACMD_EXPRESSION , low_priority)]
254+
unsafe fn sonic_attack_air_hi_expression(fighter: &mut L2CAgentBase) {
255+
let lua_state = fighter.lua_state_agent;
256+
let boma = fighter.boma();
257+
frame(lua_state, 4.0);
258+
if is_excute(fighter) {
259+
RUMBLE_HIT(fighter, Hash40::new("rbkind_attacks"), 0);
260+
}
261+
frame(lua_state, 10.0);
262+
if is_excute(fighter) {
263+
ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32);
264+
}
265+
frame(lua_state, 13.0);
266+
if is_excute(fighter) {
267+
RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0);
268+
}
269+
}
270+
253271
#[acmd_script( agent = "sonic", script = "game_attackairlw" , category = ACMD_GAME , low_priority)]
254272
unsafe fn sonic_attack_air_lw_game(fighter: &mut L2CAgentBase) {
255273
let lua_state = fighter.lua_state_agent;
@@ -310,6 +328,7 @@ pub fn install() {
310328
sonic_attack_air_b_effect,
311329
sonic_attack_air_hi_game,
312330
sonic_attack_air_hi_effect,
331+
sonic_attack_air_hi_expression,
313332
sonic_attack_air_lw_game,
314333
);
315334
}

fighters/toonlink/src/acmd/aerials.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -219,15 +219,15 @@ unsafe extern "C" fn toonlink_attack_air_hi_expression(fighter: &mut L2CAgentBas
219219
}
220220
frame(lua_state, 11.0);
221221
if is_excute(fighter) {
222-
macros::RUMBLE_HIT(fighter, Hash40::new("rbkind_spinattack"), 0);
222+
macros::RUMBLE_HIT(fighter, Hash40::new("rbkind_pierces"), 0);
223223
}
224224
frame(lua_state, 31.0);
225225
if is_excute(fighter) {
226226
ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32);
227227
}
228228
frame(lua_state, 33.0);
229229
if is_excute(fighter) {
230-
macros::RUMBLE_HIT(fighter, Hash40::new("rbkind_pierces"), 0);
230+
macros::RUMBLE_HIT(fighter, Hash40::new("rbkind_piercem"), 0);
231231
}
232232
frame(lua_state, 55.0);
233233
if is_excute(fighter) {

fighters/wolf/src/acmd/specials.rs

+37
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,41 @@ unsafe fn wolf_special_lw_start_effect (fighter: &mut L2CAgentBase) {
141141
}
142142
}
143143

144+
#[acmd_script( agent = "wolf", script = "expression_speciallwstart" , category = ACMD_EXPRESSION , low_priority)]
145+
unsafe fn wolf_special_lw_start_expression(fighter: &mut L2CAgentBase) {
146+
let lua_state = fighter.lua_state_agent;
147+
let boma = fighter.boma();
148+
if is_excute(fighter) {
149+
ItemModule::set_have_item_visibility(boma, false, 0);
150+
slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR);
151+
}
152+
frame(lua_state, 1.0);
153+
if is_excute(fighter) {
154+
RUMBLE_HIT(fighter, Hash40::new("rbkind_attacks"), 0);
155+
}
156+
frame(lua_state, 3.0);
157+
if is_excute(fighter) {
158+
ControlModule::set_rumble(boma, Hash40::new("rbkind_shield_on"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32);
159+
}
160+
}
161+
162+
#[acmd_script( agent = "wolf", script = "expression_specialairlwstart" , category = ACMD_EXPRESSION , low_priority)]
163+
unsafe fn wolf_special_air_lw_start_expression(fighter: &mut L2CAgentBase) {
164+
let lua_state = fighter.lua_state_agent;
165+
let boma = fighter.boma();
166+
if is_excute(fighter) {
167+
ItemModule::set_have_item_visibility(boma, false, 0);
168+
}
169+
frame(lua_state, 1.0);
170+
if is_excute(fighter) {
171+
RUMBLE_HIT(fighter, Hash40::new("rbkind_attacks"), 0);
172+
}
173+
frame(lua_state, 3.0);
174+
if is_excute(fighter) {
175+
ControlModule::set_rumble(boma, Hash40::new("rbkind_shield_on"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32);
176+
}
177+
}
178+
144179
#[acmd_script( agent = "wolf", scripts = ["sound_speciallwstart", "sound_specialairlwstart"] , category = ACMD_SOUND , low_priority)]
145180
unsafe fn wolf_special_lw_start_sound (fighter: &mut L2CAgentBase) {
146181
let lua_state = fighter.lua_state_agent;
@@ -307,6 +342,8 @@ pub fn install() {
307342
wolf_special_s_effect,
308343
wolf_special_lw_start_effect,
309344
wolf_special_lw_start_sound,
345+
wolf_special_lw_start_expression,
346+
wolf_special_air_lw_start_expression,
310347

311348
wolf_special_air_n_game,
312349
wolf_special_n_effect,

0 commit comments

Comments
 (0)