Movement steps: Difference between revisions

→‎Air Step: clarify the actual events
(stationary ground step exists twice)
(→‎Air Step: clarify the actual events)
Line 10: Line 10:
# Else, set Mario's y position to the floor, (possibly causing a [[downwarp]]), and update graphics. Return GROUND_STEP_NONE.
# Else, set Mario's y position to the floor, (possibly causing a [[downwarp]]), and update graphics. Return GROUND_STEP_NONE.
Also see [[Idle#stationary ground step]]
Also see [[Idle#stationary ground step]]
== Air Step ==
== Air Step ==
''Certain things here are more explained on their individual pages. If something lacks detail, check the link for more information.''
''Certain things here are more explained on their individual pages. If something lacks detail, check the link for more information.''
Line 48: Line 47:
# This repeats until Mario encounters something besides '''nothing happens''', up to four times including the initial time.
# This repeats until Mario encounters something besides '''nothing happens''', up to four times including the initial time.
# Mario tracks his "exit", with '''nothing happens''' being tracked if the whole process completed four times.
# Mario tracks his "exit", with '''nothing happens''' being tracked if the whole process completed four times.
With the outcome selected and the movement mostly done, a series of things happen.
 
* If Mario's velocity is not negative, his "peak height" is updated.
=== Perform Air Step ===
* Mario's step noise is updated based on his floor.
 
* If Mario is not flying, [[Gravity#Mario|gravity]] is applied.
# Set Mario's wall to null
* [[Vertical Wind|Vertical wind]] is now applied/accounted for.
# (this is a loop) Do 4 times:
* Mario's visual position is updated to Mario's position.
## Let the next intended position be Mario's position plus velocity/4
* Mario's yaw is updated to match the in-game angle.
## Perform an air quarter step, where "new position" means "next intended position" btw, as shown above
## If nothing happens, continue loop, else exit loop
# Let stepResult be the result of the last air quarter step performed
# If Mario's y velocity is positive, set peak height to Mario's y position (the peak height field is used for things like fall damage)
# Mario's step noise is updated based on his floor.
# If Mario is not flying, [[Gravity#Mario|gravity]] is applied.
#[[Vertical Wind|Vertical wind]] is now applied/accounted for.
# Mario's visual position is updated to Mario's position.
# Mario's yaw is updated to match the in-game angle.
# Return stepResult
 
=== Common Air Step Results ===
=== Common Air Step Results ===
If doing a common air step, Mario now decides what to do based off the "exit" from the quarter-frame checks before. Here is what he does for each exit:
If doing a common air step, Mario now decides what to do based off the "exit" from Perform Air Step. Here is what he does for each exit:
* '''Nothing Happens''':
* '''Nothing Happens''':
** Mario's animation is now applied.
** Mario's animation is now applied.
188

edits