Walking: Difference between revisions

753 bytes added ,  12 August 2023
finish todo
(there's more)
(finish todo)
 
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]], [[Ledge Climb Down]]
|into=common moving cancels: [[Water Plunge]], [[Shockwave Bounce]], [[Squished]], [[Standing Death]], [[Quicksand Death]], non-cancel: [[Begin Sliding]], [[Standing against Wall]], [[Breaking]], [[Decelerating]], (jumps: [[Hold Quicksand Jump Land]], [[Quicksand Jump Land]], [[Steep Jump]], [[Jump]], [[Doube Jump]], [[Flying Triple Jump]], [[Triple Jump]]), [[Dive]], [[Move Punching]], [[Turning Around]], [[Crouch Slide]], [[Freefall]], [[Ledge Climb Down]]
|out of=
|out of=
|animation=
|animation=
Line 21: 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)
== Set jump from landing ==
# If quicksand depth > 11, if Mario is holding an object, [[Hold Quicksand Jump Land]] else [[Quicksand Jump Land]]
# If on steep floor, update forwardVelocity and facing direction, [[Steep Jump]]
# Else:
## If double jump timer is 0, or squish timer is not 0, [[Jump]]
## Else if the previous action is:
### [[Jump Land]], [[Freefall Land]], or [[Side Flip Land Stop]]: [[Double Jump]]
### [[Double Jump Land]]; then
#### if has wing cap: [[Flying Triple Jump]]
#### if forward velocity > 20: [[Triple Jump]]
#### [[Jump]]
### else: [[Jump]]
# Set double jump timer to 0
== 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 30: Line 46:
##if forwardVel >= 16 and m->floor->normal.y >= 0.17364818; [[Braking]]
##if forwardVel >= 16 and m->floor->normal.y >= 0.17364818; [[Braking]]
##else; [[Decelerating]]
##else; [[Decelerating]]
#if INPUT_A_PRESSED; (todo; see ref) <ref>https://github.com/n64decomp/sm64/blob/1372ae1bb7cbedc03df366393188f4f05dcfc422/src/game/mario.c#L1018 set_jump_from_landing</ref>
#if INPUT_A_PRESSED; [[#Set jump from landing]]<ref>https://github.com/n64decomp/sm64/blob/1372ae1bb7cbedc03df366393188f4f05dcfc422/src/game/mario.c#L1018 set_jump_from_landing</ref>
#if INPUT_B_PRESSED;
#if INPUT_B_PRESSED;
##if forwardVel >= 29 and stickMag > 48; yVel=20; [[Dive]]
##if forwardVel >= 29 and stickMag > 48; yVel=20; [[Dive]]
Line 44: Line 60:
#check_ledge_climb_down (can transition to [[Ledge Climb Down]])
#check_ledge_climb_down (can transition to [[Ledge Climb Down]])
#tilt_body_walking
#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) {
188

edits