246
edits
Icecream17 (talk | contribs) (common moving cancels) |
Icecream17 (talk | contribs) (there's more) |
||
Line 7: | Line 7: | ||
|group= Moving | |group= Moving | ||
|id= todo | |id= todo | ||
|into=common moving cancels: [[Water Plunge]], [[Shockwave Bounce]], [[Squished]], [[Standing Death]], [[Quicksand Death]], non-cancel: [[Begin Sliding]], [[Standing against Wall]], [[Breaking]], [[Decelerating]], todo, [[Dive]], [[Move Punching]], [[Turning Around]], [[Crouch Slide]], [[Freefall]], | |into=common moving cancels: [[Water Plunge]], [[Shockwave Bounce]], [[Squished]], [[Standing Death]], [[Quicksand Death]], non-cancel: [[Begin Sliding]], [[Standing against Wall]], [[Breaking]], [[Decelerating]], todo, [[Dive]], [[Move Punching]], [[Turning Around]], [[Crouch Slide]], [[Freefall]], [[Ledge Climb Down]] | ||
|out of= | |out of= | ||
|animation= | |animation= | ||
Line 14: | Line 14: | ||
[[File:Walking.svg|alt=A velocity/time graph of Mario's speed during the first 45 frames (1.5 seconds) of walking|thumb|Mario's speed during the first 45 frames (1.5 seconds) of walking. Note that this depends on the floor's slope (see [[De facto speed]]).]] | [[File:Walking.svg|alt=A velocity/time graph of Mario's speed during the first 45 frames (1.5 seconds) of walking|thumb|Mario's speed during the first 45 frames (1.5 seconds) of walking. Note that this depends on the floor's slope (see [[De facto speed]]).]] | ||
The '''walking''' action occurs when Mario is moving only by using the analog stick. It can also occur when exiting water (except if exiting water through a [[water jump]]). | The '''walking''' action occurs when Mario is moving only by using the analog stick. It can also occur when exiting water (except if exiting water through a [[water jump]]). | ||
== Common moving cancels == | == Common moving cancels == | ||
All actions in the "moving" group check the following cancels before running any behavior script: | All actions in the "moving" group check the following cancels before running any behavior script: | ||
# If Mario's y position is lower than 100 units below the water level, do stuff, [[Water Plunge]] | # If Mario's y position is lower than 100 units below the water level, do stuff, [[Water Plunge]] | ||
# If Mario's current action does not have the "invulnerable" flag, and input_stomped, dropheldobject stopridingobject [[Shockwave Bounce]] | # If Mario's current action does not have the "invulnerable" flag, and input_stomped, dropheldobject stopridingobject [[Shockwave Bounce]] | ||
Line 23: | Line 21: | ||
# If Mario's current action does not have the "invulnerable" flag, and health < 0x100, dropheldobject stopridingobject [[Standing Death]] | # If Mario's current action does not have the "invulnerable" flag, and health < 0x100, dropheldobject stopridingobject [[Standing Death]] | ||
# [[Idle#quicksand death|Potentially cancel into Quicksand Death]] (sinkingSpeed = 0.25) | # [[Idle#quicksand death|Potentially cancel into Quicksand Death]] (sinkingSpeed = 0.25) | ||
== Behavior == | == Behavior == | ||
When walking<ref>https://github.com/n64decomp/sm64/blob/master/src/game/mario_actions_moving.c#L777</ref>: | When walking<ref>https://github.com/n64decomp/sm64/blob/master/src/game/mario_actions_moving.c#L777</ref>: | ||
Line 41: | Line 38: | ||
#if INPUT_Z_PRESSED; [[Crouch Slide]] | #if INPUT_Z_PRESSED; [[Crouch Slide]] | ||
#update_walking_speed | #update_walking_speed | ||
#case GROUND_STEP_LEFT_GROUND; [[Freefall]] | #switch (perform_ground_step): | ||
#case GROUND_STEP_HIT_WALL; push_or_sidle_wall | ##case GROUND_STEP_LEFT_GROUND; [[Freefall]] | ||
##case GROUND_STEP_NONE: if intendedMag - forwardVel > 16, dust | |||
##case GROUND_STEP_HIT_WALL; push_or_sidle_wall | |||
#check_ledge_climb_down (can transition to [[Ledge Climb Down]]) | |||
#tilt_body_walking | |||
Here's what update_walking_speed is for convenience:<syntaxhighlight lang="c"> | Here's what update_walking_speed is for convenience:<syntaxhighlight lang="c"> | ||
void update_walking_speed(struct MarioState *m) { | void update_walking_speed(struct MarioState *m) { |
edits