Commit graph

20477 commits

Author SHA1 Message Date
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
287c018790 If timelimit is being modified before starttime, tick the secret timer but don't modify the total limit. 2022-10-15 16:03:39 +01:00
toaster
02884d235c If timelimit is set while being modified (extremely unlikely but technically possible), stop adding extra time. 2022-10-15 15:58:24 +01:00
toaster
31bba30dcc No time limit in Capsule timeattack 2022-10-15 15:55:31 +01:00
toaster
52c0e145be Fix pointlimit messages occouring in singleplayer contexts
Still an awful child that hasn't shaped up like their sister cv_timelimit, but this will do for now.
2022-10-15 15:51:57 +01:00
toaster
414550dc3b Don't make gptest behaviour apply in Record Attack. 2022-10-15 15:45:59 +01:00
toaster
21be55e924 Fix cup level list behaviour
- Frees existing string data
- Unbinds cup backreference here instead of in p_setup
2022-10-15 15:43:11 +01:00
toaster
19e427f5db Compilation warning: disambiguating parens in A_AttractChase 2022-10-15 15:15:58 +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
e7f111c25a Fix the case where GP coop would cause no Capsules + possibly DUELs in eventmode
Also reduces some of the dead time before Break The Capsules begins by cutting out the majority of POSITION!! and hiding the one measly bulb that would otherwise appear
2022-10-15 14:57:35 +01:00
toaster
54a1ac9944 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into special-stages 2022-10-14 18:40:30 +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
f926842b30 Fix replacing cups' map lists not properly reassigning the cachedlevels 2022-10-14 13:19:20 +01:00
toaster
b129e21fb4 Merge branch 'demo-path-buffer-too-small' into 'master'
Fix buffer overflow related to time attack demos

See merge request KartKrew/Kart!732
2022-10-14 09:09:54 +00:00
James R
01faa52162 Clean up instances of malloc replay file path
- Fix allocating only enough for "MAPXX".
- Fix memory leak in M_StartTimeAttack.
- Use va instead of malloc + sprintf, strdup where needed.
Some of these pass gpath to va anyway so that should be
enough room.
2022-10-13 16:34:24 -07:00
Eidolon
4bf008b59f Add missing .mk for dummy target
(cherry picked from commit d46c2013329c219e62ae19c819eee293671b3293)
2022-10-13 18:20:21 -05:00
GoldenTails
59ea961f58 Make dummy compile again, if SDL is explicitly set to 0
(cherry picked from commit ba55947ee6ab36efc04598953a78a11173103bcf)

# Conflicts:
#	src/doomtype.h
#	src/dummy/i_system.c
2022-10-13 18:06:48 -05:00
toaster
cf6ffcf15d Improved Battle Capsule pop visual
- Play a sound on initial hitlag, since pops are now delayed
- Add hitlag visual to sides
- Add horizontal momentum based on:
    - Deflection of the object damaging it
    - Whatever its momentum was before destruction
2022-10-13 21:34:36 +01:00
SteelT
e004633fe6 Fix double-free in W_Shutdown 2022-10-13 13:15:06 -04:00
toaster
c2ef5a32e9 Seperate FINISH text from khud_cardanimation
- Fixes an issue where the card animation and the FINISH animation operating on two different timers, but using the same variable, would intefere with each other
- Also makes khud_fault use the same drawer, so it can benefit from interpolation
2022-10-13 18:14:48 +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
5103b804ba Simplify intermission timer code
- We had two ways of ending the intermission, but only one would actually be used, and it resulted in code duplication.
- Combine the two ways.
- Disable the reached-but-didn't-do-anything-before-now code path for setting endtic.
2022-10-13 13:12:07 +01:00
toaster
a22d3b201d Make what's going on with K_RetireBots in Y_Ticker/Y_EndIntermission more explicit, in case we add anything else here later. 2022-10-13 12:41:27 +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
toaster
00b73d4a48 Rework nextmap a little further
- Set gamemap after intermission, rather than before.
    - Fixes a bug where the NO CONTESTed player wouldn't get cycled out on the 4th round, because it had already been incremented by G_GetNextMap.
- Make the vote screen a special NEXTMAP_VOTING constant, for sanity, and to make cv_advancemap handled all in one place.
    - Along with the above, fixes a bug where changing cv_advancemap would only enable or disable the voting screen, not change the nextmap.
- Call G_EndGame in G_NextLevel, since they were never used seperately.
- Add Special Stage and marathonmode to K_CanChangeRules.
2022-10-12 19:48:01 +01:00
toaster
df467a4a32 Bot skin selection fixes
- The case where entries on the end of the `grabskins` list were invalid
- Double ++ for botskinlistpos meant any successful skin-rival placement also guaranteed an Eggrobo (default skin)
2022-10-12 12:52:08 +01:00
toaster
99705faea6 Add a goofy little jitter to the HUD
- Medium strength at 5 seconds to go
- Big strength in overtime
2022-10-11 23:03:56 +01:00
toaster
243f38227c Rework time limit a bit
- Make timelimitintics handled a bit more like gamespeed, encore, frantic, etc - update on mapload/starttime, not during gameplay
    - Use default setting if can't change rules - this is a surprise tool that will help us later
- Have it properly update when adjusting gametype from the menu
    - Cleaned up SV_StartSinglePlayerServer to do this
- Remove CV_SAVE to prevent time limit bruh moments
2022-10-11 23:00:44 +01:00
toaster
13c8d45764 Rework bot skin randomisation
- Instead of picking over numskins and adjust the number if it picks an already used skin, build and shuffle a list of allowed skins and pick over that instead.
- Fixes some issues with increased weighting towards the skins immediately after your rivals' skins.
- Use PR_RULESCRAMBLE instead of PR_UNDEFINED.
- Why am I doing it in this branch? I'm getting re-acquainted with how bots are handled between matches in advance of disabling them for bonus events without losing or corrupting data.
2022-10-11 18:42:04 +01:00
toaster
dbc067f87a Use GP difficulty str values instead of hardcoded "Master" exception 2022-10-11 16:47:56 +01:00
toaster
44eb099cfb Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into special-stages 2022-10-11 15:44:32 +01:00
Sally Coolatta
b03cb9e1a8 Drastically speed them up 2022-10-11 03:10:50 -04:00
Sally Coolatta
8953cf54bb Speed Pads are now a TERRAIN effect
- Use `SpeedPad` to set the strength. Intended to be scaled like Trick Panels, so 1 for yellow, 2 for red, so on. Can use floating point.
- Use `SpeedPadAngle` to rotate the thrust direction. This is in the same system as map angles, so east is 0, north is 90, west is 180, and south is 270. Also accepts floating point.
- Speed Pad angle accounts for the flat alignment itself, as well.
- Like Sneaker and Trick Panels, the sector / line special are now deprecated.
2022-10-11 02:26:54 -04:00
Sally Coolatta
7559169144 Fix Trick Panel TERRAIN not working 2022-10-11 01:31:06 -04:00
Sally Coolatta
8d6d8fff6b Add item type enum to config 2022-10-10 23:19:34 -04:00
Sally Coolatta
67efbceda9 Add missing Item Boxes / Item Capsules 2022-10-10 22:53:22 -04:00
Sally Coolatta
b2c4fa74f9 Add newer UDMF config 2022-10-10 22:45:35 -04:00
Sally Coolatta
2ac062e5b3 Merge branch 'master' into udmf-cherrypick 2022-10-10 19:34:11 -04:00
Sal
e7b493723f Merge branch 'rename-kart-commands' into 'master'
Rename "kart" prefixed cvars

See merge request KartKrew/Kart!724
2022-10-10 23:33:08 +00:00
toaster
d364e5a5f6 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into rename-kart-commands
# Conflicts:
#	src/d_netcmd.c
#	src/d_netcmd.h
2022-10-10 17:34:28 +01:00
toaster
32ec9fd4e9 WADNAME map definition lump special case
- For .wad resources, if a map is called WADNAME:
    - Everything up to the first full stop in the file name is substituted as the long lumpname (so WADNAME in RR_GREENHILLS.beta3.wad replaces map RR_GREENHILLS)
    - Has (hacky) support for Zone Builder temporary files on Windows
    - If WADNAME is passed to `-warp` (but NOT `-map` or `+map`) go to the most recent loaded WADNAME
    - Requires everyone to customise their testing parameters to disable MSDOS 8.3 filenames
- For all resources:
    - Jart added lumpname hashes for the first 8 characters. Use these in W_CheckNumForLongNamePwad and the map equivalent
2022-10-10 16:26:20 +01:00
Sally Coolatta
6b9f29adc4 Fix item capsules not getting to be blue 2022-10-10 10:54:29 -04:00
Sally Coolatta
779aade139 Bot Hints use args 2022-10-10 10:50:14 -04:00
Sally Coolatta
0614a8739c Duel items use args 2022-10-10 10:48:44 -04:00
Sally Coolatta
688b4fb9a9 MT_PETSMOKER uses args 2022-10-10 10:43:30 -04:00
Sally Coolatta
7cee4ff32a MT_STEAM's kart behavior uses args 2022-10-10 10:40:06 -04:00
Sally Coolatta
4896a9c843 MT_MAYONAKAARROW uses args 2022-10-10 10:36:59 -04:00
Sally Coolatta
d30c24d2eb Fix embarrassing copy-paste error 2022-10-10 10:35:51 -04:00
Sally Coolatta
1ab2b4a897 Bot Controller uses args 2022-10-10 10:26:25 -04:00
Sally Coolatta
983304f361 Update birdslopes to use args 2022-10-10 10:16:40 -04:00