Replay code was not prepped for adding/removing RNG classes yet. Oops!
G_CompatLevel was not put on the changes from the previous commit, as we are planning on breaking all the compat for the new TA changes anyways. Just preventing this being a problem in the future.
- Empty `demo.titlename` case
- Don't try to save demo of name `.lmp`
- Doesn't fall back to anything, because emptying out the name field can be reasonably treated as not wanting to save
- `demo.titlename` consists only of invalid characters
- Don't try to save demo of name `-.lmp`
- Falls back to the default demo title, because the user clearly wanted to save and just happened to provide invalid text
Calls to F_ContinueCredits and D_StartTitle, even if deferred,
change the current gamestate. However, the tic loop in TryRunTics
may still have a couple tics to execute to catch up to current
time, and as a consequence G_Ticker may execute game logic while
the current state is not GS_LEVEL or equivalent. As a result, it is
highly likely for the game to crash.
This adds deferred credits start to the tic loop, and exits that
loop if either title or credits are supposed to start after the
current iteration, fixing this crash scenario.
FixesKartKrew/Kart#1185
- Name buffers are the same size as everywhere else
- Billiards Cactus no longer gets cut short
- Long player names no longer get cut short
- System in place to allow easily changing the buffer
sizes across all the demo code
- Additional comments, since this has always been kind of a rat's nest
- Use W_CheckNumForLongName for extensionless string parameter
- So you can play staffghosts.pk3 lumps via the `playdemo` console command
- If missing at launch, would have been a regression compared to the previous entry in the series
- Gate the virtres support behind a `#define`
- This isn't how we're shipping staff ghosts with the game anymore, so this would have been the only way to access them
- SKIPERRORS `#define`: Only show errors if the demo is guaranteed external, instead of suppressing them exclusively if confirmed internal
- Hides errors for restarting a staff ghost
- Prevents duplication of errors for restarting an external ghost
In some cases, bogus extradata is written into Record Attack demos,
which causes a crash when attempting to play RA with such a ghost. We
should skip this data too, because only extra real tic data is a problem
for ghost playback, not extradata.
FixesKartKrew/Kart#1175
- This was causing Aquatic Cathedral and Aqua Tunnel staff
replays to get confused for one another
- Because for both RR_AQUATICCATHEDRAL and
RR_AQUATUNNEL, the first 8 chars are RR_AQUAT
- Now uses the lump id directly instead of the name, which
entirely circumvents the problem
- Fixed:
- Time Attack menu "Replay Staff" option
- Attract mode
- Credits
- If tally is skipped, the replay will be cut short
- Just stop reading the demo if this happened after the
tally started
- It's okay to let the level continue without any input
because the player already finished (we know the result)
- Input handling is done straight in G_MapEventsToControls
- If a keyboard event is received, switch off virtual
keyboard
- Removed the input lock while virtual keyboard is
sliding away
- If a gamepad event is received, and it is a change of at
least half the full range, switch on virtual keyboard
- Most R_SkinAvailable calls should be returning index into demo.skinlist (same numerical value as when demo was recorded), for demo sync
- A handful of general things permit exception for this
- Expose `replaynumskins` (calculated as `(demo.playback ? demo.numskins : numskins)`) to Lua
- There's *always* more that can be done for this, but this is the minimum spec that can at least be somewhat stable