Commit graph

2249 commits

Author SHA1 Message Date
toaster
2e35a40b80 SF_IRONMAN: handle randomised skin and hurt/death states differently
- 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
2023-01-21 14:43:54 +00:00
James R
610e2c66be Adjust Garden Top physics
- 110% -> 150% top speed
- no friction decrease if grinding
- 250% -> 300% gravity when grinding (for slope sliding)
- 275% -> 325% max boost when releasing grind
- 60% minimum boost speed when relasing grind
2023-01-14 18:11:46 -08:00
toaster
9980631e2f Fix bots' realtime not ticking upwards when all human players have exited
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.
2023-01-08 13:58:14 +00:00
toaster
f4071ce42f Fix getting race-endingly stuck in zoom tubes while respawning 2023-01-06 13:50:47 +00:00
toaster
6d1dd5f089 Fix player potentially getting stuck invisible while lightsnaking when not true death respawn 2023-01-06 13:43:11 +00:00
toaster
1213836564 Permit a lightsnaking player to go into RESPAWNST_DROP (the final second of lightsnake) early at any time after the initail bring-back-to-last-waypoint.
Needs balance testing, but resolves #299.
2023-01-06 13:20:04 +00:00
James R
66e2f3a8e9 Reduce stair janking loss of control if momentum angle drifts too far from facing 2023-01-03 22:43:58 -08:00
toaster
42a6b03e48 Remove "circuitmap"
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
2022-12-31 23:27:59 +00:00
toaster
425a02d09b Make GTR_BUMPERS less monolithic
* 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
2022-12-31 23:12:41 +00:00
toaster
94bcf79710 Restrict collecting rings in GTR_SPHERES, not GTR_BUMPERS! 2022-12-31 22:34:19 +00:00
toaster
15587417c7 Coherency changes to special stage behaviour in anticipation of timeattack support
* 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
2022-12-27 22:24:18 +00:00
toaster
470f82104d Rework intertype_t
- 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
2022-12-27 14:33:58 +00:00
toaster
17dd15b998 "Special Mode" (Sealed Stars) and "Versus Mode" (bosses) are now gametypes
* 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()`.
2022-12-26 23:06:24 +00:00
James R
ba2a7744d1 Add half hitlag to invincible players if they would've been damaged 2022-12-21 08:35:26 -08:00
Sally Coolatta
7794f0956e Reset pitch/roll on springs + trick panels 2022-12-02 00:27:34 -05:00
Sally Coolatta
e331910fe3 Reduce VFX toggle
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
2022-11-26 20:12:00 -05:00
toaster
b8f59fd227 Skin and playerstate code in demos has been partly rewritten to support more than was previously possible.
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)
2022-11-22 14:28:48 +00:00
AJ Martinez
1798ae9f4e Merge remote-tracking branch 'origin/master' into ironman 2022-11-03 19:37:29 -07:00
AJ Martinez
80252717c9 Kill SF_HIRES, use skin_t highresscale instead 2022-11-03 16:19:17 -07:00
AJ Martinez
8d4688af12 Ironman: fix non-Race transformations and true death skin restore 2022-11-03 06:15:45 -07:00
AJ Martinez
8d2d6bfc78 Ironman: return to base character when exiting 2022-11-03 03:38:56 -07:00
AJ Martinez
8c800cf88e Ironman: use introtime transform in non-race 2022-11-03 03:38:55 -07:00
AJ Martinez
2a46af5a44 Ironman: animation fixes, don't transform in POSITION 2022-11-03 03:38:55 -07:00
AJ Martinez
8cc535925b Ironman: Randomize every lap and after intro 2022-11-03 03:38:55 -07:00
AJ Martinez
86366b000c HOSTCODE 'ironman' - WIP 2022-11-03 03:38:54 -07:00
James R
b0e079bdf0 Update botvars rubberband and controller in P_PlayerAfterThink instead of K_BuildBotTiccmd
These vars directly affect gamestate but K_BuildBotTiccmd
only runs for the server.
2022-10-31 14:36:21 -07:00
James R
58bb648b0a Merge branch 'udmf-cherrypick' into 'master'
Update our UDMF

Closes STJr/SRB2#862

See merge request KartKrew/Kart!727
2022-10-29 06:54:48 +00:00
Eidolon
2476455195 Loop inclusive for r_splitscreen
r_splitscreen indexes from 0 inclusively
2022-10-27 19:11:35 -05:00
toaster
ec437b199c Rearrange P_PlayerThink to make some things occur even in Hitlag
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
2022-10-15 16:29:53 +01:00
toaster
ca2ecf6e9f Add "allowdemos" option to K_CanChangeRules()
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.
2022-10-15 15:15:22 +01:00
toaster
f281f47c6f Support alternate gameplay events during GP
- 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.
2022-10-14 18:34:43 +01:00
toaster
c8471c7c27 Rework exit timing nittygritty
- 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
2022-10-13 17:37:35 +01:00
toaster
9f4ced146a Make intermission timer-dependent material consistent via K_CanChangeRules()
Prevents setting inttime 0 in singleplayer contexts
2022-10-12 20:17:20 +01:00
MascaraSnake
3b971835ee Add Lua backwards compatibility for FOF flags 2022-10-09 01:56:50 -04:00
Nev3r
5c9599f0a9 "UDMF: The whole thing" merged
See merge request STJr/SRB2!1714

Barely any RR features reimplemented
2022-10-09 01:13:37 -04:00
James R
05dd7d7871 Merge remote-tracking branch 'origin/master' into HEAD 2022-10-01 14:45:39 -07:00
James R
f6b4b9213b Merge branch 'rework-savecheckpoint-command' into 'master'
savecheckpoint cheat online

See merge request KartKrew/Kart!718
2022-09-30 22:52:05 +00:00
James R
ee2302d6ee Merge branch 'noclip-online' into 'master'
Cheat/Debug Commands ...ONLINE

See merge request KartKrew/Kart!717
2022-09-30 22:51:42 +00:00
James R
f3668fbd7c Merge branch 'top-final' 2022-09-29 10:52:45 -07:00
James R
13a17fa0f8 Disable checkpoint saved by savecheckpoint when disabling cheats
What a mouthful.
2022-09-29 07:44:52 -07:00
James R
57a3c4109c Reset player cheat effects when disabling cheats cvar 2022-09-29 05:54:58 -07:00
James R
048e7e807c Remove macro to disable noclip camera 2022-09-29 01:37:51 -07:00
James R
56a5432f41 Adjust most player physics for Garden Top
- 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
2022-09-28 02:01:37 -07:00
James R
5063a4acf1 The Garden Top
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.
2022-09-28 02:01:37 -07:00
Sally Coolatta
de506b8ff1 Merge branch 'master' into water-skip-conditions 2022-09-27 19:21:20 -04:00
Sally Coolatta
afc2a0dcdc Properly spawn effects for the other objects 2022-09-27 13:09:30 -04:00
toaster
d8bb2fe8fe Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into setangle
# Conflicts:
#	src/k_kart.c
#	src/p_enemy.c
#	src/p_mobj.c
2022-09-26 16:25:06 +01:00
Sally Coolatta
4165fae63f Merge branch 'master' into cheats-streamline 2022-09-25 17:29:38 -04:00
VelocitOni
1d2e1420f6 Merge branch 'master' into cheats-streamline 2022-09-25 14:27:17 -04:00
Sally Coolatta
139d6f4a49 Merge branch 'master' into rng-states-2 2022-09-25 14:04:19 -04:00