Commit graph

1642 commits

Author SHA1 Message Date
toaster
43eb61dfcb Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into prisons-death-fix
# Conflicts:
#	src/p_inter.c
2023-08-31 14:02:38 +01:00
toaster
e123ed7480 MAJOR cleanup of Spectator set/unset
- G_AddPlayer now contains CL_ClearPlayer, G_DestroyParty, and playeringame set
- Instead of a nasty, complicated block in P_SpawnPlayer, externalise it into G_SpectatePlayerOnJoin
- All mid-game human player-to-spectator transitions are handled by P_SetPlayerSpectator, instead of lots of `spectator = true` and associated boilerplate
    - Simplifies Got_Teamchange MASSIVELY
        - Of course this is helped by also stripping back team change
    - This is called by P_KillPlayer, too
- P_KillPlayer no longer eats DMG_SPECTATOR when lightsnaking or exiting
- G_GametypeHasSpectators condition tidied
2023-08-26 19:48:20 +01:00
James R
cb06fedc18 Make -writetextmap a console command, call it "writetextmap"
- Convert multiple maps at once
- The game cheers for you when it's done and tells you
  where it saved the TEXTMAP files
2023-08-26 06:05:09 -07:00
James R
6c0b042eed Refactor cvar definitions completely, move everything to cvars.cpp
- No need to call CV_RegisterVar
- Cvar definitions live in only one file, easier to locate
- Organized into sections -- netvars, cheats, etc.
- Use builder pattern to initialize cvars
- Still need to extern if you want to read the cvar value
2023-08-25 17:22:40 -07:00
James R
c194ccb81a Remove more unused cvars
- respawnitem
- respawnitemtime
- respawndelay
- startinglives
2023-08-25 17:18:21 -07:00
toaster
4abc0b2c5d Merge branch 'motd' into 'master'
Add server join splash (resolves #266)

Closes #266

See merge request KartKrew/Kart!1423
2023-08-25 20:43:02 +00: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
019546e846 Add server join splash
Just wanted to give literally any possibility of seeing the server contact as a client
2023-08-25 14:42:01 -04:00
Oni
148b56eccf Merge branch 'kill-dead-shit' into 'master'
Remove some unused code

See merge request KartKrew/Kart!1420
2023-08-24 22:10:43 +00:00
James R
c5e341769b Remove unused cvars
- growmusicfade
- invincmusicfade
- music_resync_powerups_only
- music_resync_threshold
- renderstats (wasn't even registered in the console!)
- resetspecialmusic
- resume
- samplerate
- stretch
- tailspickup
2023-08-24 04:52:41 -07:00
James R
0a9d15ceb0 Remove remnants of LJOYSTICK 2023-08-24 04:34:19 -07:00
toaster
b0ee900422 d_netcmd.c: Fix errors with multiple _OnChange functions
- Skin_OnChange
    - Now always checks for cheats for any machine-local player skin change in non-netgame, non-K_CanChangeRules contexts
    - Previously applied only to consoleplayer in Time Trial
- Color_OnChange
    - Fixes straight up incorrect condition that prevented honest players from changing color mid-game via the developer console
2023-08-23 18:24:45 +01:00
toaster
e7dc2cda0c d_netcmd.c: Fix default values for color cvars (and associated lastgoodcolor) to not error when we make basically all of the colours unlockables. 2023-08-23 18:18:37 +01:00
AJ Martinez
3900189199 Auto Spin -> Auto Roulette 2023-08-20 16:26:34 -07:00
AJ Martinez
88f54b298e Auto Spin review fixup 2023-08-20 16:03:43 -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
01e2a26689 DEVELOP: let us spectate or pause the game at all times
TODO: This should be available as a debugging option at
release, since it would be useful for addon authors.
I don't want to make more cvars, those are getting
cluttered and should maybe be coalesced into a single
debugging option.
2023-08-19 05:01:40 -07:00
AJ Martinez
7a2841c407 "debugstart" cvar to skip POSITION/intro 2023-08-12 15:35:10 -07:00
James R
e75204a899 Replace instances of itemRoulette.active = false with K_StopRoulette
Properly clear ringbox state so it doesn't override egg
transfer item HUD.
2023-08-11 19:21:59 -07:00
James R
6b85dacaaa Merge branch 'dedi-bots' into 'master'
Fix bots never acting on dedicated servers (#574)

See merge request KartKrew/Kart!1335
2023-08-11 23:51:53 +00:00
AJ Martinez
4b0a9ce7a6 Register the fucking cvar 2023-08-07 19:19:59 -07:00
AJ Martinez
1cdb498862 DEVELOP cvar to turn off encore palettes (readability testing) 2023-08-07 19:06:21 -07:00
Oni
ddf55d4040 Merge branch 'server-param' into 'master'
-server for map command

See merge request KartKrew/Kart!1350
2023-07-24 23:13:50 +00:00
Oni
b82392dee6 Merge branch 'more-conversions' into 'master'
More UDMF conversions

See merge request KartKrew/Kart!1336
2023-07-23 17:24:17 +00:00
toaster
67a1fda79b Permit starting a netgame or match race from the console via the map command
None of the following can be combined together, and Grand Prix is still the default with no parameter from the menus.

- `-server`
    - Starts a server
- `-match`
    - Starts a Match (Race) round
- `-skill`
    - Already existed, but can now only be used for GP

Also guarantees the main menu wil be closed, which wasn't previously guaranteed.
2023-07-22 17:02:53 +01:00
toaster
3d383f209e Got_TeamChange: Applying PF_WANTSTOJOIN is NOT a playstate change 2023-07-22 14:37:34 +01:00
toaster
39d9dc99aa FinalisePlaystateChange: Don't reset spectatorReentry timer if it's already nonzero 2023-07-22 14:33:32 +01:00
toaster
e0b47b16e7 Improve Spectator entry handling
- Re-entry SHOULDN'T get stuck nonzero on first join for a given node
    - Set to 0 for all players on level start
    - Set to 0 for all players on level end
    - DEFINITELY never intentionally set on join with teamchange finalisation
    - This basically just prevents people from spamming New Challenger after hopping out mid-session, since the previous version, in addition to being buggy, was a little annoying.
- New Challenger no longer happens on tic 0 of mapload
    - Handles any late, pending PF_PF_WANTSTOJOINs without threat of reset in P_PostLoadLevel
2023-07-22 14:03:11 +01:00
toaster
5b4fc18264 P_PostLoadLevel: Move all events directly requiring finalised player lists into this function
- Grand Prix (& backup) and Match Race bot initialisation
    - Fixes rival selection
- P_InitPlayers
    - Has to be after bot init
- Beginning of demo recording
    - Grand Prix and Match Race replays appear to both function far better, and equivalently to boot.
        - A desync in "RNG seed 24" is reported. This is PR_BOTS. This is the only notable desync I can see!
- ACS_LoadLevelScripts
    - I'm not ironclad sold on this being the forever home, but it's also a not-from-netsave thing, and barring external input I could see some scripts being dependent on a finalised player list.
2023-07-22 13:17:16 +01:00
James R
7c3d3282f0 Merge branch 'console_sanity' into 'master'
Console Sanity

Closes #517

See merge request KartKrew/Kart!1344
2023-07-19 22:17:10 +00:00
toaster
ba7307b425 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into more-conversions 2023-07-19 22:46:49 +01:00
toaster
02651d249c Set default value of bots to Off, not 0 2023-07-18 20:43:07 +01:00
toaster
a07a9e2191 Don't use skincolor unlocks in situations where gamedata is inappropriate
- Recieving a different client's XD_NAMEANDCOLOR
- Loading profiles on game boot
2023-07-18 10:50:25 +01:00
AJ Martinez
ab71148c4d Botcontrol is for servers 2023-07-16 01:28:50 -07:00
toaster
36e0a23c09 Remove console script support from maps
The linedef's behaviour was broken horribly by long map names, and it's not worth the effort to fix it for the following reasons.
- It was considered a security vulnerability to have free access to the console when it was written.
- The game literally had a cvar to disable running console scripts. That's "I am willingly distributing ActiveX Word Documents in 2023" levels of foolhardery.
- Anything GOOD it can do, both Lua and ACS can do better.
2023-07-12 16:32:23 +01:00
James R
427ab44471 Add setspheres command 2023-06-29 21:01:13 -07:00
toaster
1ec5b74892 Implement SECRET_MEMETAUNTS
Permits "Meme" player taunt voice and "Meme" follower horn options
2023-06-28 19:31:40 +01:00
toaster
e7ee979f1a Horncode
A much more focused replacement for Hornmod, specc'd out by Tyron and Oni working together and implemented by the author of this commit because it's pretty funny.

- Followers have `hornsound` in their SOC configuration.
    - The default sound for all followers without a provided one is sfx_horn00.
- They'll play this sound if you use lookback with one following you, and there's nearby players to get the player looking all the way around.
    - Only the players who are successfully considered for lookback will hear it.
- Has a v1-like visual with less randomisation, but still netsynced.
- Also controlled by the cvar `taunthorns`, which, like `tauntvoices`, takes "Tasteful" (default), "Meme", and "Off".

TODO: make the condition for horn a little delayed, so you have to hold lookback for a little bit.
2023-06-28 17:54:23 +01:00
toaster
4344221252 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into seeecret-colors 2023-06-28 12:48:50 +01:00
Oni
93e3b2aca0 Merge branch 'conclusions' into 'master'
Conclusions

See merge request KartKrew/Kart!1300
2023-06-28 00:51:45 +00:00
Oni
f393b9782b Merge branch 'super-flicky' into 'master'
Battle: Super Flicky power-up, give power-up command, general functions for interfacing power-ups (also Lua)

See merge request KartKrew/Kart!1301
2023-06-28 00:31:53 +00:00
Oni
1217934693 Merge branch 'zvote-menu' into 'master'
Call Vote + Admin Tools Menus

See merge request KartKrew/Kart!1303
2023-06-28 00:24:32 +00:00
toaster
ec8a6247c2 Z-vote is now server-authoriative
- Only calls callback if you're the server (and not demo.playback, forward thinking for stored xcmd netreplays)
- G_GamestateUsesExitLevel() for homogenising the conditions that permit XD_EXITLEVEL to be dispatched and recieved
2023-06-27 14:16:48 +01:00
James R
7130435667 Let give command give power-ups, amount = power-up duration in tics 2023-06-27 02:08:07 -07:00
AJ Martinez
c71bb7092e Merge remote-tracking branch 'origin/master' into ringbox 2023-06-26 19:19:21 -07:00
AJ Martinez
0a6bac0dcc Ringbox: HUD, transform time define, ring-box-only, scaling rewards 2023-06-26 17:36:41 -07:00
toaster
34987fbffc FIXED IT
- SendNameAndColor was completely out of order for some reason
- SendNameAndColor was sending cvar value instead of the send value. The value for sending. The value chosen specifically for sending, the send value.
- Color_OnChange was just broken in the SKINCOLOR_NONE case
2023-06-27 00:07:40 +01:00
toaster
5036719280 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into seeecret-colors
# Conflicts:
#	src/k_menudraw.c
2023-06-26 23:25:47 +01:00
toaster
45f8f1c89f Remove a bunch of unused emerald stuff inherited from SRB2
All superseded by M_CheckCupEmeralds + GTR_POWERSTONES stuff
2023-06-25 23:49:20 +01:00