For a cvar cheat to save in replays do this:
- Make sure it's a netvar
- Only netvars are saved in replays
- Use OnlineCheat
- Make sure it's not CV_HIDDEN
- CV_HIDDEN cvars are not added to the linked list, so
replays cannot find them
- Use CV_NOSHOWHELP instead, to prevent people from
modifying it in console
- Use CV_Set or CV_SetValue to change a cvar's value
- Setting cvar_t.value directly will not change its
string value
- The string value is used to determine how it should be
saved in replays
- Freeze finish line distance (instead of recalculating it
from old nextwaypoint)
- Reset auto respawn timer right before it runs out
(instead of AS SOON as finish line distance returns to
normal)
- Do not ever update respawn waypoint while auto respawn
timer is ticking
- Do not interact with finish line while auto respawn
timer is ticking
- Do not increment lap during lightsnake
- Symmetrical with decrement behavior
- Let lap be restored to higher safelap
- Prevent headaches if lap is erroneously decremented
- Previous order:
- K_HandleLapIncrement
- K_UpdateAllPlayerPositions
- Sets player->position
- !! Relies on player->exiting
- Set lap points
- !! Based on player->position
- Set latestlap
- P_DoPlayerExit
- Set player->exiting
- K_UpdateAllPlayerPositions
- Sets player->position
- Relies on player->exiting
- Overwrites latestlap if not set
- K_InitPlayerTally
- Based on lap points
- New order:
- K_HandleLapIncrement
- Set latestlap
- If ending last lap, P_DoPlayerExit
- Set player->exiting
- K_UpdateAllPlayerPositions
- Sets player->position
- Relies on player->exiting
- Overwrites latestlap if not set
- [NO LONGER INITS TALLY]
- OTHERWISE, K_UpdateAllPlayerPositions
- Sets player->position
- Relies on player->exiting
- Set lap points
- Based on player->position
- P_PlayerAfterThink
- If player is exiting and no tally, K_InitPlayerTally
Hopefully you can see the magnitude of the gordian knot I had to untangle to fix this
- Polyobject carrying set lastlook on mobjs for internal
tracking
- lastlook is used by some objects to track their own
state
- Ring Shooter uses lastlook to remember which player
summoned it
- A Ring Shooter spawned right next to a polyobject would
become buggy; If its owner player pressed the respawn
button again before the Ring Shooter despawned, that
player would be teleported back to the Ring Shooter
instead of spawning a new Ring Shooter (which would be
the correct behavior)
This does not prevent you from using the respawn button to
summon a Ring Shooter.
- Ring Shooter only tracks the last player who touched it,
to prevent that player from reusing it
- If another player touches the Ring Shooter, it loses
track of the original user
- Near a Block Lightsnake waypoint, this would enter an
endless loop where both players are able to touch the
Ring Shooter and use it to respawn, placing them right
above the Ring Shooter (and the cycle repeats)
- When updating nextwaypoint, check if distancetofinish
jumps more than 32768 units (8192 in 1/4 scale maps)
- If it jumps this much, do not update the waypoints
- This prevents nextwaypoint from skipping ahead in a map
where waypoints from later in the course overlap
waypoints from earlier