Commit graph

202 commits

Author SHA1 Message Date
Oni
bc0a187961 Merge branch 'thing-script-args' into 'master'
Separate script args from mapthing args

See merge request KartKrew/Kart!1405
2023-08-25 23:29:06 +00:00
Sally Coolatta
3c8eb505cc Merge branch 'master' into thing-script-args 2023-08-25 18:32:55 -04:00
Oni
b63f3f6f16 Merge branch 'majin-box' into 'master'
Auto Roulette (resolves #618)

Closes #618

See merge request KartKrew/Kart!1411
2023-08-25 19:24:42 +00:00
Sally Coolatta
f02e6dbe3c Final thing args code cleanup
- Fix the last few bugs I could find with thing args
- Move version update code
- Rename internal variables to `thing_[string]args` to make older code merge issues more obvious
2023-08-22 02:14:09 -04:00
AJ Martinez
3900189199 Auto Spin -> Auto Roulette 2023-08-20 16:26:34 -07:00
AJ Martinez
fbfc75df71 Item box autospin 2023-08-20 05:08:53 -07:00
James R
8a72f42818 Split G_ExitLevel into G_BeginLevelExit and G_FinishExitLevel
- Save retry condition in G_BeginLevelExit
- Apply condition in G_FinishExitLevel

Preparation for ACS level end scripts, since the exit
condition will need be known when the countdown starts,
not when it ends (that'd be too late to do anything in the
level).
2023-08-20 00:36:00 -07:00
James R
83f02231e3 Replace spectator movement with demo freecam 2023-08-19 05:01:40 -07:00
James R
8809ab02fc democam: remove unnecessary fields 2023-08-19 05:01:40 -07:00
James R
dbca307ad4 Fix sound handling in demo freecam
- Object sounds are audible from the location of the
  camera
- Certain HUD sounds should no longer be audible
  - For instance, lap complete sfx
2023-08-19 05:01:40 -07:00
toaster
859b3fa350 On second thoughts, let's be EXTRA careful to avoid any potential double frees. 2023-07-22 13:17:17 +01:00
toaster
bf8d09980d G_DoPlayDemo: Make sure buffer is NULL so you can watch replays immediately after recording them.
This is yet another g_demo.c-specific hack, and has been marked as such.
2023-07-22 13:17:16 +01:00
toaster
6c6306889a M_StartMessage revamp
Immense 25-file diff, so spun off into its own branch.
- Improved appearance
    - Not just a big block of text on a blue background
    - Well, OK, the main part is, but some stuff has been spun out into its own fields
        - Title text
        - Text and button prompt for Yes/No or OK
    - Slides with pow on and off the screen
- Disabled MM_EVENTHANDLER, which has always been dog but got considerably worse after newmenus to the point nothing's using it anymore
    - Required in order to reduce the reliance on FUNCPTRCAST, which prevents Eidolon from compiling some stuff because it's not valid C++
2023-06-09 19:23:36 +01:00
Oni
82a4af03e2 Merge branch 'demo-fix-custom-maps' into 'master'
Search for map and gametype after addons are loaded when watching replays

See merge request KartKrew/Kart!1211
2023-04-30 23:44:45 +00:00
Sal
7990842da3 Merge branch 'G_LoadDemoInfo-dont-crash' into 'master'
G_LoadDemoInfo: don't read outside of the buffer if the file is too small

See merge request KartKrew/Kart!1205
2023-04-29 17:00:35 +00:00
James R
8b81478e39 G_DoPlayDemo: search for map and gametype after addons are loaded 2023-04-29 01:16:48 -07:00
James R
a10c9fea39 G_DoPlayDemo: let argument be const 2023-04-26 14:12:29 -07:00
James R
c54f1a52bd G_LoadDemoInfo: don't read outside of the buffer if the file is too small 2023-04-25 18:49:31 -07:00
toaster
2d46112c58 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into round-queue
# Conflicts:
#	src/d_netcmd.h
2023-04-17 20:08:37 +01:00
Sally Coolatta
668d832ca1 Delete respawn command, put Ring shooter on Y 2023-04-17 00:23:06 -04:00
toaster
19ef96351a roundqueue
A general purpose system that permits cacheing of GP progression in one place, but which permits future expansion and brings Online GP a little closer to reality.
- Stores a bunch of levels, gametypes, encore state, and restricted-by-rank-ness in sequence.
    - Initialised on GP cup select.
    - FUTURE WORK: Open to being initialised by other methods
- Digests its way through that sequence as maps are completed.
- Stores round number instead of `grandprixinfo`.
- Map commands as sent over the wire have been adjusted.
    - Sends round number and size of/position in roundqueue.
    - Now figures out GP Event Type from gametype.
        - Can be swung in the direction of a Special Stage with a hint flag.
        - This hint flag replaces "fromlevelselect", which was functionally vestigal.
2023-04-11 17:18:27 +01:00
Sally Coolatta
15f60a1f14 Split thing voting screen to a new file 2023-04-03 20:57:31 -04:00
toaster
4c0077e07c Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into conditions-cascading 2023-03-19 13:01:06 +00:00
James R
4974b04ddd g_demo.c: fix skip of EZT_ITEMDATA
blame f86f794d2
2023-03-18 03:41:23 -07:00
toaster
3e900d7f57 G_DirtyGameData: Dirty bit only applied in I_Error and signal handlers, nowhere else
- Unfortunately, the way this system previously worked, the unlock was given to you for free if you accidentially opened two copies of the game at once.
- Instead, open the file in r+ mode, shimmy along 5 bytes, and write a `true` to be read later.
- Far more memory safe than rewriting the entire gamedata out on crash.

ALSO:
- crashflags has been split into boolean evercrashed and UINT8 musicflags.
    - We don't need to track if the LAST session was a crash, at least not right now.
    - Opens the floor up to other music like Loser Club happening on the Challenges menu.
2023-03-17 14:42:06 +00:00
toaster
2e1efaff0c Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into conditions-cascading
# Conflicts:
#	src/k_battle.c
#	src/k_hud_track.cpp
#	src/k_kart.c
#	src/p_inter.c
2023-03-14 21:59:19 +00:00
toaster
01f6eb71f5 Optimisation: reduce the number of calls to M_CheckUnlockConditions
- For P_Ticker()'s calls to M_UpdateUnlockablesAndExtraEmblems
    - Do not check non-UCRP_REQUIRESPLAYING conditions
        - Controlled by a new `boolean doall` parameter to M_UpdateUnlockablesAndExtraEmblems
        - Most other contexts have this as true
        - Forced true if update is meant to be silent
    - Only check UCRP_REQUIRESPLAYING conditions if a relevant property has been touched
        - Controlled by a new `boolean checkthisframe` property on roundcondition_t
        - Set in all contexts where roundcondition_t is modified
        - Would also be set on lap change, but that case is already covered by the following
- Check all conditions, both UCRP_REQUIRESPLAYING and not, on:
    - local player K_HandleLapIncrement
    - local player P_DoPlayerExit
    - local player P_DoTimeOver
    - Controlled by a new `boolean deferredconditioncheck` property on gamedata_t
2023-03-12 13:52:28 +00:00
toaster
fea235d8a7 UC_REPLAY
Save a replay after finishing a round.
Basically another tutorial unlock condition like UC_ADDON
2023-03-10 21:44:48 +00:00
James R
c781780ff8 Lose bumpers when using the respawn command 2023-03-08 19:01:03 -08:00
James R
f86f794d20 g_demo.c: track player mobj health instead of bumpers
Lord have mercy on my soul!!!
2023-03-07 22:29:49 -08:00
toaster
0f715454fa Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into conditions-cascading 2023-03-05 19:51:48 +00:00
toaster
0c75c40060 Rework how Bots handle their skin availabilities
Before we can add extra unlock features, we need to make sure we're not building on a house of sand.
- R_SkinUsable: Use Net Unlock system if playernum is -1
- R_BotDefaultSkin: Move to r_skins.c, cache skin search
- R_GetSkinAvailabilities: Use Net Unlock when called for bots (and always permit R_BotDefaultSkin)
- Got_AddBot: Call R_GetSkinAvailabilities for summoned bots to guarantee sync status of available skins
- K_UpdateMatchRaceBots: Tidy up to match grand prix bot skin selection system, hiding server-locked skins and defaulting to R_BotDefaultSkin if you don't have enough unlocked for the remaining player slots
2023-03-05 18:06:09 +00:00
AJ Martinez
79d8e4e109 WIP: SPB Attack - temp menu draws OOB, no unlocks 2023-03-03 12:14:58 -08:00
AJ Martinez
41be94ec5f Use correct ziptic size parsing RA ghosts 2023-02-27 23:10:14 -07:00
AJ Martinez
7788fa116f Review fixes 2023-02-26 14:55:41 -07:00
AJ Martinez
69d100ac53 We are no longer out of ziptics 2023-02-25 03:16:27 -07:00
AJ Martinez
432be46a2f Please god just fucking work 2023-02-24 20:04:36 -07:00
AJ Martinez
7c08634f7e WIP: Turn towards local camera (midgame join broken right now) 2023-02-24 16:59:22 -07:00
James R
fdddbcfd82 g_demo.c: ensure demobuf is always freed before use 2023-02-14 04:17:04 -08:00
toaster
c6dde48245 g_demo.c, M_EndModeAttackRun, D_ClearState - Unset demo.title in one specific place
Fixes returning from title demo to titlescreen
2023-02-04 17:13:07 +00:00
toaster
59f9609160 G_AddGhost, G_LoadRecordGhosts: Re-add support for loading staff ghosts.
- UINT8 *buffer for AddGhost must now be allocated and filled externally.
- Introduce P_TryAddExternalGhost helper function for existing external ghosts.
- Call vRes_Free(curmapvirt) later, and NULL to make incorrect usage immediately obvious.
2023-02-04 15:46:15 +00:00
toaster
29ddf06f1e G_DoPlayDemo: Add support for replays stored inside map vres 2023-02-03 18:18:43 +00:00
toaster
1efc5883e0 G_DoPlayDemo: Remove memory leak in pdemoname 2023-02-03 18:16:18 +00:00
toaster
99bf1c10e8 staffbrief_t
- Demos are VERY large and should not be cached for every map in the game all at once.
- Instead, store a small amount of data related to staff ghosts for later reference.
    - best time (for use in Medals)
    - best lap (maybe use for Medals too)
    - player name (for use in Time Attack menu)
2023-02-03 00:55:34 +00:00
toaster
2d5d5343b1 M_EndModeAttackRun bugfixes
- Correctly restore menu state after failed record attack run
- Making things easier for future work - use demo.title as signifier to go back to title screen
2023-01-31 14:00:21 +00:00
toaster
05301d0825 Repair demos that finish without crashing inexplicably returning to titlescreen after their completion
It's because of cv_cheats' default value in DEVELOP builds...
2023-01-28 23:18:50 +00:00
toaster
ede0f56819 Revert all instances of P_SaveBufferFree(&demobuf) for now
g_demo.c is officially No Man's Land
2023-01-05 23:44:40 +00:00
James R
5c51ad77f6 Use P_SaveBufferFree everywhere
- Fixes PR_SaveProfiles calling stdlib free on zone
memory.
- Also touched g_demo.c
2023-01-03 23:23:34 -08:00
toaster
80d19a8458 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into save_p-unglobal-alt
# Conflicts:
#	src/g_demo.c
2023-01-03 19:45:18 +00:00
Sally Coolatta
aa4fd8ab13 Add functions to initialize savebuffer_t
g_demo.c is mostly unaltered because it is made of twigs.
2023-01-02 19:47:59 -05:00