251
edits
SuperHamster (talk | contribs) (Using Distinguish template) |
Icecream17 (talk | contribs) (add some out of) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{stub}} | {{stub}} | ||
{{Distinguish|Dive|Dive Picking Up}} | {{Distinguish|Dive|Dive Picking Up}} | ||
{{Action_infobox | {{Action_infobox | ||
|title=Dive Slide | |title=Dive Slide | ||
Line 12: | Line 10: | ||
|id=0x56 | |id=0x56 | ||
|into= | |into= | ||
|out of= | |out of=todo: [[Dive]], [[Flying]] | ||
|animation= | |animation= | ||
|related= | |related= | ||
}} | }} | ||
#If not(<code>m->input & INPUT_ABOVE_SLIDE</code>) and A or B is pressed: | |||
##If mario's forwardVel > 0, [[Forward Rollout]], else, [[Backward Rollout]]. | |||
#Update sliding. | |||
#If Mario's new floor is not a slope, and Mario's forward velocity squared < 64, and the animation is at an end, [[Stomach Slide Stop]]. | |||
#Object grab ???? | |||
#Common slide action ???? | |||
<syntaxhighlight lang="c"> | |||
s32 act_dive_slide(struct MarioState *m) { | |||
if (!(m->input & INPUT_ABOVE_SLIDE) && (m->input & (INPUT_A_PRESSED | INPUT_B_PRESSED))) { | |||
#if ENABLE_RUMBLE | |||
queue_rumble_data(5, 80); | |||
#endif | |||
return set_mario_action(m, m->forwardVel > 0.0f ? ACT_FORWARD_ROLLOUT : ACT_BACKWARD_ROLLOUT, | |||
0); | |||
} | |||
play_mario_landing_sound_once(m, SOUND_ACTION_TERRAIN_BODY_HIT_GROUND); | |||
//! If the dive slide ends on the same frame that we pick up on object, | |||
// Mario will not be in the dive slide action for the call to | |||
// mario_check_object_grab, and so will end up in the regular picking action, | |||
// rather than the picking up after dive action. | |||
if (update_sliding(m, 8.0f) && is_anim_at_end(m)) { | |||
mario_set_forward_vel(m, 0.0f); | |||
set_mario_action(m, ACT_STOMACH_SLIDE_STOP, 0); | |||
} | |||
if (mario_check_object_grab(m)) { | |||
mario_grab_used_object(m); | |||
m->marioBodyState->grabPos = GRAB_POS_LIGHT_OBJ; | |||
return TRUE; | |||
} | |||
common_slide_action(m, ACT_STOMACH_SLIDE_STOP, ACT_FREEFALL, MARIO_ANIM_DIVE); | |||
return FALSE; | |||
} | |||
</syntaxhighlight>{{actions}} |
edits