This merge request fixes/changes lots of things about how NiGHTS mode handles, hopefully leading to a more expected and "defined" experience.
I'm submitting it as a draft, as I don't know how to accomplish the rest:
General:
player->sidemove
and player->forwardmove
being +35,-36 when pressing down-right, which yields an angle of 314)player->mo->pitch
instead of player->mo->rollangle
, so that the player angle looks correct regardless of viewing direction (Only relevant in multiplayer or with ghosts)DEMOVERSION
, and check for older demo versions to use the old code in P_NiGHTSMovement()
, P_XYMovement()
, and P_PlayerZMovement()
when watching replays(I'd also have liked to change player->flyangle
from an INT32 of 0-359 into an angle_t of 0-ANGLE_MAX, but that'd break any existing Lua scripts that play with NiGHTS mode.)
Bouncing/Slopes:
Reverse gravity:
Technical:
angledif2
out of P_NiGHTSMovement()
(technically might have a difference if Lua sets player->flyangle
above 359), and un-loop a for
loop by incrementing by thrustfactor
directlyP_NiGHTSGetTrackYaw(player)
, P_NiGHTSGetPlaneSlopeAngle(player,slope)
, and P_NiGHTSBounceOffPlane(player,ceiling)
, to help calculate/handle NiGHTS angles and bounces
Debugging:
DBG_NIGHTS
-devmode now shows messages in the console when you bounce off walls/floors/ceilings, with the old and new flight angle and the slope angleDBG_NIGHTSBASIC
-devmode now displays "Angle: [player->flyangle]
" above "Drill: [player->drillmeter]
"DBG_NIGHTSBASIC
-devmode no longer displays a very faint 4294967295 (-1) link value when you don't have a link