- P_DamageMobj
- Become skin temporarily to show off the hurt frames
- Sets charflags, so P_PlayerThink can handle reversion
- Add sparkles for losing disguise
- P_KillPlayer
- Sets charflags, so P_PlayerThink can handle reversion
- Add extra sound for losing disguise
- G_PlayerReborn
- Sets charflags in not-betweenmaps case as well, so P_PlayerThink can handle reversion
- P_SpawnPlayer
- Use set skin for spawn again (partial revert of previously committed code)
- P_PlayerThink
- More specific conditions for fakeskin reversion
- Not hurt, dead, or respawning (except for last part of drop)
- Add sound and sparkles for reapplying disguise
This corrects the issue where bots have the same time on exit as the last human player, and therefore tie with them, with disastrous consequences for GP.
An effectively useless global scope boolean that literally checks for the presence of a finish line, created in and used only by things we inherited from vanilla SRB2
* Battle-like item box respawn handling inverse of GTR_CIRCUIT
* Make battle fullscreen overlay forbid GTR_CIRCUIT
* Make GTR_ITEMARROWS actually do something
* Make everything related to points actually use GTR_POINTLIMIT
* Fobid sphere addition without GTR_SPHERES, to mirror ring addition forbidding
* Make everyone PF_NOCONTEST (but not explode) if the UFO/emerald reaches the end of its waypoint path.
- Possibly temporary: Make the UFO/emerald go straight up at its final waypoint
* If you have PF_NOCONTEST, K_IsPlayerLosing is true
* If special stage in action and the only reason you'd be behind is your position, nobody loses
* Never eliminate last in special stage
* Time Over funny camera no longer occurs when PF_NOCONTEST but not dead
- Now you select based on whether you want to rank by
- Time always (Race, Special)
- Score always (might be useful for custom gametypes..?)
- Time in 1P, Score otherwise (Battle, Versus)
- No longer has gametype-specific text colours on the intermission
- Also cleans up a case where invalid music could play for winning a custom gametype without GTR_CIRCUIT *or* GTR_BUMPERS
* The existing structs are now exclusively for handling extra data.
* `specialStage` has been renamed to `specialstageinfo`, to reflect that it is not the sole arbiter.
* `specialstageinfo.valid` and `bossinfo.valid` are what must be checked before grabbing data from either struct.
* These are turned on when the gametype extra data is successfully initialised, not on map start.
* `K_InitBossHealthBar(...)` for `bossinfo.valid`
* `K_InitSpecialStage(void)` for `specialstageinfo.valid`
* `K_CanChangeRules(...)` no longer checks these
* No longer uses duplicate encore information.
* The map command (and -warp) now guesses gametype using a general `G_GuessGametypeByTOL(UINT32)` function
* Grabs the first gametype with an overlap between the requested TOL and the gametype's TOL.
* The cool Versus-specific intro is now checked via `K_CheckBossIntro()`.
Can be used to disable VFX, so it can only appear if its owner is a display player. If no owner is provided, then it will be removed entirely.
Applied to most things that Ivo asked for
Notable new features:
- Guaranteed native compatibility with SF_IRONMAN even with differing # of skins
- Bots (todo: can still desync midway through round)
Implementation details:
- Demo code (skins):
- Instead of writing a skin name string, and the player's kartspeed, kartweight, and charflags for each player in the initial player-interpreting loop...
- Write a skinlist of EVERY skin's name string, kartspeed, kartweight, and flags next to the file list, to be read into `demo.skinlist`.
- If the skin name isn't loaded, find the skin with (in order)
- SF_IRONMAN if your skin had SF_IRONMAN, since that's more important to signal
- the closest stats otherwise (as per previous implementation)
- Just as tolerant to stats AND the number of base skins changing between versions (the bonuschars aegis situation)
- Not tolerant to restat, but we can add a DXD or EZT later if we want to natively support that kind of mod
- In the initial loop and DXD_SKIN, just write an index that can be used for `demo.skinlist`, and store it in `demo.currentskinid[p]`
- The player's skin is now encoded as EZT_IRONMAN for ghosts (and just in case RNG sync fails for unrelated reasons)
- In the SF_IRONMAN code when demo.playback is true
- everywhere where `skins[player->skin]` is referenced instead uses an index into `demo.skinlist`
- SetRandomFakePlayerSkin uses the `demo.skinlist` to build a table to ensure exact random call parity
- Also means it no longer double rejection-samples.
- `player->fakeskin` and `lastfakeskin` are always == their original recording values, a skin id which can be used into `demo.skinlist`
- Demo code (playstate, initial player setup loop):
- Add bot flag (`DXD_PST_ISBOT`, `DEMO_BOT`)
- Add in-between-level botvars (difficulty, diffincrease, rival)
- Don't rely on `PF_WANTSTOJOIN` to activate
Additional bugfixes:
- Followerskin set to -1 in CL_ClearPlayer so a bad follower isn't recorded on player join without name and color change arriving immediately
- Accomodate new joiners in demo code even if they're not on DXD_PST_SPECTATING for one reason or another
- Demo extra file list saving is now its own function for code cleanliness
- Actually only modify players relevant to the demo at the end of G_DoPlayDemo, not all 16 by supplying and overwriting garbage values (POSSIBLE MEMORY CORRUPTION FIX, mobj_t pointer was previously dereferenced)
Notably REALTIME - prevents the timer stopping when you get hit, but also:
- Typing indicator
- Airtime tracking
- Kickstart accel
- No Contesting due to racecountdown
- Spectator data wipe
- Stronger preventative measure for possible finish line multi-hit events
It's been used interchangably as "this is a singleplayer gameplay context" and "This is a no cvar changing context". This addition repairs some behaviour which might have been inconsistent between netgame and netreplay.
- Implementation details:
- grandprixinfo.eventmode is the reference point
- All bots have spectator applied and removed at map start depending on eventmode, and I've done my best to guard against side effects of not removing them entirely
- You shouldn't turn off grandprixinfo.gp when turning on things like specialStage.active or bossinfo.boss when pursuing eventmode behaviour
- Probably needs to be integrated into XD_MAP for any future netplay support, is currently disabled.
- You technically don't have to assign a Capsules map to be the bonus and a Special Stage to be the special. A Capsules map can be assigned to a Special Stage too, and a Boss can be assigned to either of them.
- Special Stages are still just as incomplete as they were before.
- Break the Capsules has special behaviour.
- Timelimit starts at 20 seconds.
- Earn 10 seconds (plus a little extra cheaty time) every capsule you destroy.
- WIN + extra life if you bust all the capsules, COOL if you get some but run out of time, LOSE if you lose your bumper or run out of time without breaking a single capsule.
- Supposed to also give you rings, but ran into a LOT of difficulty with this and didn't want to commit half-baked stuff, so it'll be a later project.
Also:
- Fix a long standing bug where totalring was reset between maps, preventing the sum from adding up across GP rounds and depriving you of extra lives you were owed.
- Fix an issue where Break the Capsules record attack was KARTSPEED_HARD.
- Send timelimitintics in savegames, since it's handled seperately now.
- exitcountdown is now used for both No Contest and regular exits
- Set in P_DoPlayerExit
- Handles sending XD_EXITLEVEL in P_Ticker
- player->exiting is now 0 or 1 (we can make it a bool or a new timer later)
- Fixes a longstanding bug where failing a GP round could restart multiple times
Also:
- Fix a possible waiting-in-the-wings issue where mapchanges would occour client-side in K_CheckBumpers
- Add `gptest` cheat - sets numlaps to 1 lap on mapload for quick but legitimate(ish) progression
- Auto accel
- 800% acceleration
- 110% top speed
- Infinite tether like Lightning Shield
- Resists going upward on slopes
- Less friction
- Can always turn your sprite
- Turning speed does not get weaker at high speeds
- Turning speed is normal underwater
- Keeps moving in momentum direction, regardless of how
you turn
- Releasing a drift redirects all your momentum in that
direction
- Floats over bananas, damage sectors and offroad
- No stair janking while floating
- Hold drift for extra gravity. Not only does this fast
fall (this stacks with true fast falling), it builds
momentum down slopes too!
- Parries Big Players (Grow), Invincibility, Flame Shield
and, of course, other Tops -- all except if you're
grinding
- Wipes out anyone you touch
- Infinite weight like Bubble Shield
- Does not water skip
- Does not water run while holding drift
This is all the visual effects and item logic of the Top
minus (almost all [1]) physics adjustments when a player is
riding one.
While on a Top:
- Otherwordly humming while floating
- Cannot drift [1]. Instead, holding drift begins grinding
the Top into the ground -- sparks fly out
- Sprite tilts left and right as you turn
- No wheel screech when turning too far
- Speed lines while holding drift
- Tripwire Boost effect scales to cover you AND the Top
- One hit and you lose it
- Throwing forward, getting hit or just losing it because
you were in first place for too long: the Top flies out
from under you and begins snaking like crazy
- Throwing backward also makes the Top fly out from under
you but it also thrusts you forward. The Top dies
instantly so it's not dangerous ;-)
- If you're in first for too long, it begins vibrating
- If you tumble, it dances across your entire screen
A loose top will tumble anyone it hits.