Commit graph

18883 commits

Author SHA1 Message Date
toaster
f0e5e1b71a Save gamedata once all pending unlocks have been updated 2022-11-30 19:27:26 +00:00
toaster
5ba1d4c197 Unlocks now only get marked unlocked when heading to the main menu
EXTREMELY early, but...
- M_InterruptMenuWithChallenges hijacks certain transitions
    - Currently only initial profile selection and title screen, but the intercept is low-profile enough to add wherever necessary
- M_GetNextAchievedUnlock gets the first unlock in the listing that has all its conditions achieved but isn't unlocked
- Preliminary Challenges menu
    - Currently only ticks between Achieved but not Unlocked unlocks with the above function, no tilegrid yet
2022-11-30 17:26:33 +00:00
toaster
0aa85bf291 Unused variable in Got_AddBot 2022-11-30 17:17:40 +00:00
toaster
8b1407c096 Proper MP emblem support
- Also adapted from (STJr/SRB2!1756)
- Unlike that MR, absolutely no sharing - this is a game of exclusively competitive gametypes.
2022-11-30 14:32:33 +00:00
toaster
845fe12b52 Conversion to using gamedata_t
A small piece of (STJr/SRB2!1756).
Due to how RR currently handles time attack records and how it WILL handle unlocks, it's not currently feasible to split everything such that you can have two independent gamedata_t... but what's done so far is certainly more sane and less dependent on global variables
Other minor refactors:
- M_UpdateUnlockablesAndExtraEmblems and M_SilentUpdateUnlockablesAndEmblems are now one function with a boolean for loudness
- Unlock prints are currently living in the console, since the cecho stuff was a little broken
2022-11-30 13:19:21 +00:00
James R
3d500148cd Make Test Run the default map in DEVELOP builds
This makes testing easy by starting the game with -server
2022-11-29 16:54:31 -08:00
toaster
6a2aa87e95 Fix unlock bounds check for linedef type 319
Fix from (STJr/SRB2!1767)
2022-11-29 17:44:25 +00:00
toaster
3dc2ad64d6 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into unlockables-undefeatable 2022-11-29 17:42:33 +00:00
James R
07c30a20c2 Move all sources into CMakeLists.txt
Changing Sourcefile did not automatically update the CMake
cache.
2022-11-28 21:46:43 -08:00
Sal
50a1dcf979 Merge branch 'cmake-overhaul' into 'master'
cmake: Rollup of srb2-side changes

See merge request KartKrew/Kart!758
2022-11-29 04:42:58 +00:00
SteelT
7b0361a6f2 Make vsync default to off 2022-11-28 23:05:54 -05:00
toaster
bb66a536a9 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into unlockables-undefeatable 2022-11-28 22:32:13 +00:00
toaster
49c71962f5 Update linedef type 441 to only not happen in MP (or demo playback)
Only areas missed from the precursor to the "multiplayer emblems" MR
2022-11-28 22:29:36 +00:00
toaster
b074d6cbdd Fix the actual problem with saving in DEVELOP: cv_cheats didn't have CV_NOINIT
Also fixes a likely waiting-in-the-wings crash for the next time we make a non-DEVELOP build.
2022-11-28 19:21:02 +00:00
Sally Coolatta
81cefa2697 Gachabom initial pass
They simply use Kitchen Sink's item icon and Orbinaut's sprites.

The forward toss behavior needs fine-tuning to use more MT_BANANA style behavior.
2022-11-28 02:41:42 -05:00
Sally Coolatta
a0bcd52bf1 Break the Capsules HUD tracking 2022-11-28 01:47:00 -05:00
James R
404aa0b5fe Hide MT_OVERLAY with drawpickups 2022-11-27 21:19:04 -08:00
James R
479f9e4d57 S_ReducedVFXSoundAtVolume: use player_t* 2022-11-27 17:27:22 -08:00
James R
051b4f8935 Always use typedef name instead of struct name
mobj_t instead of struct mobj_s
2022-11-27 17:21:40 -08:00
James R
0d0310a140 typedef.h: typedef node_t
d_net.c: rename node_t to netnode_t
2022-11-27 17:21:40 -08:00
James R
b5310a1f68 Add typedef.h
All typedefs for structs that were present in other header
files have been moved to here. (Except node_t because the
renderer and netcode both define node_t LOL.)
2022-11-27 17:21:40 -08:00
toaster
6d0637d39d Unlockable skins (in a way friendly to #define MAXSKINS 255)
Mammoth commit, sorry. I only realised halfway through writing it that SECRET_SKIN was only partially merged.

Ports from 2.2:
- Merge SECRET_SKIN (STJr/SRB2!1474)
    - Default skin is now handled by checking all skins for unlock status, and I_Erroring if none are available
    - Don't show skin names on game startup, to keep our secrets hidden
    - Unlockables now have string variables zallocated.
         - For skin names rather than numbers.
    - Correctly clean up memory when freeing unlockables and emblems.

Bespoke code:
- For temporary testing. `unlocks.pk3`
    - Using this for rapid testing gameboot SOC instead of patch.pk3 because of the intent to turn that into scripts.pk3
- Don't not save gamedata in DEVELOP builds, even if you've used cheats!
- `player->availabilities` is now an array of UINT8
    - (MAXSKINS + 7)/8 entries, or 32 bytes.
    - Included with XD_ADDPLAYER instead of XD_NAMEANDCOLOR.
         - Simplifies a lot of logic with respect to demos, skin changes mid-game, etc.
             - Seriously, there's a lot of random places in the code that just iterate over MAXSPLITSCREENPLAYERS and g_localplayers to update availabilities in real time in a way that's not particularly netsafe...
         - Lines up with the plan for handling unlocks when returning to menus.
         - Was included with XD_ADDBOT, but that actually overruns the netxcmd buffer at first mapload with 7 bots. We might need to consider expanding the size of the netxcmd buffer...
    - In demos, can be interpreted as both relative to the original replay and the current skin list depending on boolean context provided to R_SkinUsable.
    - Used for SF_IRONMAN (and will crash if all other skins are inaccessible).
- Grand Prix bot randomisation uses the host's unlocks.
- Don't show locked characters on the fancy new character select.
-  DXD_JOINDATA for demos
    - Replaces the dual-purpose behaviour of DXD_PLAYSTATE
    - Contains availabilities
    - Handles bot material in a different way
- Forceskin restrictions
    - Won't run in demos, because it's assumed recorded DXD_SKIN will handle all the conversions the original match had
    - Won't run if K_CanChangeRules says no
- Correctly set `mapvisited` on level visit, even in [fake gasp] MULTIPLAYER/NETGAMES!! 🥹
- Added updating unlockables and extra emblems on `mapvisited` update.
    - Currently fails to produce the cecho, but that'll be stripped out entirely in a future commit so I'm not bothered.
2022-11-27 22:53:29 +00:00
toaster
8179b39773 ForceAllSkins cleanup 2022-11-27 16:21:45 +00:00
toaster
990a3500bc SetSkin refactor for skin setting
Port from 2.2. Prevents some infinite loops caused by skin 0 being marked unusable.
2022-11-27 15:50:41 +00:00
James R
a8ccedbbc0 cmake: remove -Waggregate-return 2022-11-27 03:27:10 -08:00
James R
63069ce710 cmake: set C std and enable pedantic warnings
see d262190faf and cd5946be73
2022-11-27 03:20:37 -08:00
Eidolon
757e3650eb cmake: copy build shared internal libs to bin/ 2022-11-27 02:44:11 -08:00
Eidolon
8116edc5a1 cmake: Port misc options from Makefiles
- DEBUGMODE
- MOBJCONSISTANCY
- PACKETDROP
- ZDEBUG
- PROFILEMODE (likely moot, dunno how profiling with cmake works
though)
2022-11-27 02:44:11 -08:00
Eidolon
146344e7de cmake: Port warning configuration from make
Adds SRB2_CONFIG_ERRORMODE to replace ERRORMODE too.
2022-11-27 02:44:11 -08:00
Eidolon
d31037abc9 cmake: Remove asset hashing, CMAKE_ASSETS_DIR
Simplifies build setup for cmake.

# Conflicts:
#	assets/CMakeLists.txt
#	src/config.h.in
#	src/sdl/i_system.c
2022-11-27 02:44:10 -08:00
Eidolon
04674ca93b Include exchndl with <> 2022-11-27 02:44:10 -08:00
James R
1dd25181a9 cmake: use SRB2_SDL2_EXE_NAME, append git branch, add SRB2_SDL2_EXE_SUFFIX 2022-11-27 02:44:10 -08:00
Eidolon
0677d59d51 cmake: Build all deps and static link
Overhaul cmake build
2022-11-27 02:44:10 -08:00
Sally Coolatta
3c8738baab Displace bot predictions against slope physics
This makes them able to climb steep slopes significantly better.
2022-11-27 05:14:35 -05:00
Sally Coolatta
7c962fc0fa Improve Ballhog charge conditions 2022-11-27 04:48:30 -05:00
Sally Coolatta
bd2507bee7 Fix missing input arg 2022-11-27 04:43:43 -05:00
Sally Coolatta
9b439297b0 Bots will try to place Drop Targets on turns
Also a bit more Banana-like
2022-11-27 04:26:47 -05:00
Sally Coolatta
4b5681b5d5 Add Garden Top bot item function 2022-11-27 04:24:05 -05:00
Sally Coolatta
66629a3576 Bot reuses Landmine use function for Hyudoro
Previously used GenericTap, which was intended for when Hyu wasn't a trap item.

Landmine has very similar usage (trap item with only the ability to place it on your current location), so I just made it reuse that function.
2022-11-27 03:49:47 -05:00
Sally Coolatta
366ade8cbb Bots don't use items while exiting anymore
They'll just hold onto 'em now. Makes the post-exit movement a bit more seamless.
2022-11-27 03:45:45 -05:00
Sally Coolatta
a47faff820 Update bot Ballhog usage to have charging 2022-11-27 03:43:36 -05:00
Sally Coolatta
aa7c7fbf94 Bots don't use boost items in the air
No Sneaker, Rocket Sneaker, or Ring waste when they can't apply!
2022-11-27 03:33:01 -05:00
Sally Coolatta
b1b77e9496 Bots treat Drop Target more like Banana than Orbi
Fire with smaller threshold, and forcefully when banana-drag goes into effect. Fixes them holding it for absolutely way too long and making their gameplay worse.
2022-11-27 03:29:00 -05:00
Sally Coolatta
1ca522044b Fix bad usage of const 2022-11-27 03:24:07 -05:00
Sally Coolatta
581b989fe4 Fix bots being unable to trigger
UDMF regression
2022-11-27 03:00:48 -05:00
Sally Coolatta
ad02fbcf32 Reel the prediction back when it hits wall 2022-11-27 03:00:48 -05:00
Sally Coolatta
bd337d1494 Bots treat all offroad as wall
Rather than only strong offroad.
2022-11-27 03:00:47 -05:00
Sally Coolatta
63ae0ea6bd Prevent finishline ever being your prevwaypoint 2022-11-27 03:00:47 -05:00
Sally Coolatta
05e74c3e9d Fix linedef 499 conversion 2022-11-27 02:57:48 -05:00
VelocitOni
e147d41ad4 Merge branch 'master' into shadows-gammaless 2022-11-26 22:52:35 -05:00