Commit graph

86 commits

Author SHA1 Message Date
toaster
be3c0faf7e More gracefully amend Splits/Attackstart data on ghost load rather than splits load 2025-08-21 18:25:03 +01:00
Antonio Martinez
7b39fc4b7e "Staffsync" command to test staff ghost playback 2025-08-19 18:52:13 -04:00
toaster
09e23e6e18 Rip out all the rewinding code
It was all messy and none of it is called in release builds because it was so crashy in testing
2025-06-01 00:02:19 +01:00
Eidolon
cb7f437e60 Merge public master 2025-02-13 15:48:11 -06:00
Eidolon
a4d304a1f5 Update copyright years to 2025 2025-02-13 15:32:26 -06:00
Eidolon
22b20b5877 Add netgame voice chat
Implemented using libopus for the Opus codec, same as is used in Discord.
This adds the following cvars:

- `voice_chat` On/Off, triggers self-deafen state on server via weaponprefs
- `voice_mode` Activity/PTT
- `voice_selfmute` On/Off, triggers self-mute state on server via weaponprefs
- `voice_inputamp` -30 to 30, scales input by value in decibels
- `voice_activationthreshold` -30 to 0, if any peak in a frame is higher, activates voice
- `voice_loopback` On/Off, plays back local transcoded voice
- `voice_proximity` On/Off, enables proximity effects for server
- `voice_distanceattenuation_distance` distance in fracunits to scale voice volume over
- `voice_distanceattenuation_factor` distance in logarithmic factor to scale voice volume by distance to. e.g. 0.5 for "half as loud" at or above max distance
- `voice_stereopanning_factor` at 1.0, player voices are panned to left or right speaker, scaling to no effect at 0.0
- `voice_concurrentattenuation_factor` the logarithmic factor to attenuate player voices with concurrent speakers
- `voice_concurrentattenuation_min` the minimum concurrent speakers before global concurrent speaker attenuation
- `voice_concurrentattenuation_max` the maximum concurrent speakers for full global concurrent speaker attenuation
- `voice_servermute` whether voice chat is enabled on this server. visible from MS via bitflag
- `voicevolume` local volume of all voice playback

A Voice Options menu is added with a subset of these options, and Server Options has server mute.
2024-12-13 17:12:14 -06:00
toaster
512ec6c2eb XD_REQMAPQUEUE --> PT_REQMAPQUEUE
It was technically possible for custom clients to spoil future rounds of a tournament queued while they are connected to a server.
Making it a PT direct packet to the servernode both solves this problem AND reduces irrelevant NetXCmd traffic for clients.
2024-10-11 13:46:26 +01:00
Oni
71588f490f Merge branch 'queue-skin' into 'master'
Queued skin/color changes

See merge request KartKrew/Kart!2452
2024-09-28 17:46:42 +00:00
Sal
653766010d FRIENDCODE (aka, Teamplay) 2024-09-17 01:41:26 +00:00
Ashnal
33a1ca5831 Slope launch physiscs adjustments 2024-09-16 00:47:45 +00:00
Sally Coolatta
7dfa597c7d SRB2 -> DRRR copyright in src, acs, android folder
Be consistent with toaster's recent changes to copyright
2024-04-05 02:08:23 -04:00
James R
0707c9e5ec Add g_musicfade, generic system to fade out the level music for a brief period 2024-03-08 17:53:07 -08:00
James R
05d8d83dcc Refactor recorddata_t and separate into recordtimes_t 2024-01-27 04:13:01 -08:00
James R
7d6239e06c Add round end camera system
- Spins and zooms around a center point
- Freezes the level while spinning
- Pans over to follow and object after spinning ends
- Timing and speed completely customizable
2024-01-22 16:42:29 -08:00
James R
8430489673 Replace darktimer/darkness with g_darkness
Modifies netsave.

- Instead of setting a timer, set a start time and end
  time
- Interpolated darkness value itself doesn't need to be
  netsynced
2024-01-05 15:56:24 -08:00
James R
93e9bd5485 Add menu_anim_t and easing helper functions 2023-12-27 12:24:53 -08:00
James R
e89c34ac74 player_t: add icecubevars_t 2023-11-22 19:04:30 -08:00
James R
61709d36a8 Add basic profiling for Lua hooks (except HUD hooks)
- Add lua_profile cheat: calculate average time spent in
  hooks over a period
- Show hook times in a sorted table, along with lump name,
  script line number and hook type
- Show cumulative time spent in game logic hooks and
  percentage of overhead to game logic
2023-11-11 02:27:39 -08:00
Sal
cecd81b4aa Podium rank screen polished 2023-10-29 06:04:22 +00:00
Oni
b36d93c74d Merge branch 'network-debug' into 'master'
Packet loss indicator

See merge request KartKrew/Kart!1573
2023-10-24 01:26:20 +00:00
Sally Coolatta
de9780ab3f Bot controller is stored on the sector now
- Moved destination tag off of linedef tag and into args.
- Bot controller values can be changed mid-level with ACS. (Linedefs using type 2004 will still be activated on level load.)
- Add flag to make bots fastfall
2023-10-21 03:36:26 -04:00
AJ Martinez
15338c4e32 Packet loss indicator 2023-10-20 20:33:37 -07:00
Oni
005d05ac15 Merge branch 'threaded-software' into 'master'
Threaded software

See merge request KartKrew/Kart!1553
2023-10-17 09:28:59 +00:00
AJ Martinez
f9f5c74244 New bans 2023-10-16 23:50:50 +00:00
Eidolon
68a8f2b274 Multithread software drawing 2023-10-14 15:26:52 -05:00
Eidolon
2bad8126ac Delete outdated memcpy optimization
The libc memcpy is faster
2023-09-24 18:32:22 -05:00
James R.
42814cea2b Revert "W_InitFile: calculate md5sum on background thread, for startup wads"
This reverts commit 28f2659342.
2023-09-09 16:30:00 -07:00
Sal
0675a4e527 Tally screen 2023-09-09 05:27:55 +00:00
James R
28f2659342 W_InitFile: calculate md5sum on background thread, for startup wads
Add W_GetFileMD5, blocks calling thread until md5 is
calculated.
2023-09-06 18:32:41 -07:00
James R
9dc277bc3d command.h: define xcommand_t, add COM_AddDebugCommand
This will become useful soon...
2023-09-01 22:13:17 +01:00
toaster
f7635c4399 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into spraycans 2023-08-22 19:57:28 +01: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
toaster
1d06637a38 First pass at assigning unique spraycans to level headers
Increments gamedata minor version, be aware
- M_AssignSpraycans
    - Called in M_FinaliseGameData.
    - Attaches a hardcoded set of colours to all race maps in cup order, stopping once we run out.
    - The colours are shuffled, with some "freebies" always at the head of the list.
    - Integrates partial lists pretty well.
    - In DEVELOP builds, I_Errors if it produces corrupted state.
- G_LoadGameData, G_SaveGameData
    - Save & Load is implemented for these assignments
2023-08-19 15:08:55 +01:00
James R
ebba7c327c Add encore variants of LightContrast, LightAngle and SpriteBacklight to level header 2023-08-11 20:30:30 -07: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
James R
d737387132 Add flickyAttacker and powerupvars_t to player_t, add to netsave 2023-06-27 00:50:40 -07: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
a016a54e52 Rework how GP Backups are accessed
- Now actually from the relevant GP difficulty's Cupgrid, instead of the top-level Play choice
    - Permits a much cleaner M_StartCup, combining two of the previously four copypasted, slightly modified level startup regions (which could be further combined for sanity's sake, but would take a LITTLE more work right now than I have in me)
- Shows a funny exclamation mark from Sonic Rush on the relevant cup on the grid
- Selected by default when loading the menu, if appropriate
2023-06-25 23:44:39 +01:00
toaster
989070c3f1 skinreference_t
Please note this is incompatible with gamedata from previous commits on this branch. As always, keep a backup of your last stable gamedata.

A system for record data to point to either loaded or unloaded skins.
- When writing to gamedata, stores a funny internal reference id on skinrecord_t.
- This ID is then used when writing out subsequent references ala mobjnum.
- As an example, has been attached to cup windata.
    - Also assigned based on profile skin when gamedata importprofilewins event is occouring.
    - Set to your current skin if you complete a Cup, OR if you get equal or better on any existing Cup.
- Successfully reassigned alongside unloadedskin records when a skin is added.
- TEMPORARY: Character ownership of Cup wins are displayed in your latest-log.txt, in lieu of an update to the cupgrid
2023-05-30 12:21:42 +01:00
toaster
cd2a4b3807 Move skinrecord_t and unloaded_skin_t to doomstat.h
Unfortunately, they are necessary to have in this already bloated file, to avoid circular dependency in future work.
2023-05-30 12:21:41 +01:00
toaster
1527471678 Character win records
Track wins per character.
- If you have an existing gamedata of minor version 2 or earlier, attempt to import your last-used profile's wins onto the character you last used on that profile, so you're not starting from nothing. It's not quite accurate, but it's something.
- Much like map headers and cups, these are also tracked in an unloaded_skins_t linked list. That work was done in this commit because gamedata is actually loaded before even base-game characters, which is annoying but at least confirmed it was working quicker.
- TEMPORARY: Your per-character wins are displayed in your latest-log.txt, in lieu of an update to the in-game statistics menu
2023-05-30 12:21:41 +01:00
toaster
65f679c0bc Unloaded cupheader windata tracking
IMPORTANT NOTE - increments gamedata minor version to 3, as it is necessary to backfill windata to prevent losing existing cup records.

This is essentially commit 1482fd5 but for cups.
- All cups currently loaded with nonzero windata are written on gamedata save.
    - This reduces gamedata size for a player who has not unlocked every cup!
- On gamedata load, if a cup is not loaded, store the extra windata on a linked list.
- On cup header creation, check the linked list to see if an associated unloaded cupheader windata exists.
    - If it does, write the record onto the cup structure directly, and delete the "unloaded cupheader" storage struct!
- Then on the NEXT gamedata save, in addition to all loaded cupheaders, it writes the extra windata kept in long term storage in exactly the same format.
2023-05-30 12:21:39 +01:00
toaster
28677da5b9 Unloaded mapheader record tracking system
In the previous entry in the series, due to level header records existing in a NUMMAPS-sized table always saved and loaded in full, Time Attack times persisted even across game loads without the relevant custom levels added.
However, this was changed with the long map name system. Map records were assigned to level headers, which were only created on level load.
This new system brings Ring Racers up to parity (or better, due to the reduced incidence of header conflicts!)
- All levels currently loaded with records attached are written on gamedata save.
    - This reduces gamedata size for a player who has not unlocked every level!
- On gamedata load, if a level is not loaded, store those extra records on a linked list.
- On level header creation, check the linked list to see if an associated unloaded mapheader record exists.
    - If it does, write the record onto the map structure directly, and delete the "unloaded mapheader" storage struct!
- Then on the NEXT gamedata save, in addition to all loaded mapheaders, it writes the extra records kept in long term storage in exactly the same format.
2023-05-30 12:21:39 +01:00
Oni
3344ddc659 Merge branch 'profile-restrictions' into 'master'
Social restrictions until you've played some games

See merge request KartKrew/Kart!1194
2023-05-15 02:50:24 +00:00
Oni
cf304a09d4 Merge branch 'bot-thingies' into 'master'
Lots of bot changes

See merge request KartKrew/Kart!1229
2023-05-13 08:22:10 +00:00
Sally Coolatta
6fa821b2d3 Local P_LineOpening result + traversal leniency
P_LineOpening results are stored in a locally made struct instead of being a bunch of disorganized globals.

Waypoint traversals can go thru 1 line, if it was blocked by step-up rules, for free, similar concept to sound-blocking lines in Doom.
2023-05-13 00:39:36 -04:00
toaster
de22fc8ff1 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into profile-restrictions
# Conflicts:
#	src/hu_stuff.c
#	src/y_inter.c
2023-05-12 13:42:50 +01:00
toaster
36d8bce14d Replace K_DrawTabRankings with Y_PlayerStandingsDrawer
TODO: Ping, LAGLESS
2023-05-11 18:11:40 +01:00
Sally Coolatta
d9382f2100 ACS: UDMF user properties
Lines, sides, sectors, and things now all support the "Custom" tab properly. Label a property as `user_[whatever you want]` in this tab, and it will be added to the structure. ACS will then be able to retrieve it using the `Get[x]UserProperty()` function.
2023-05-02 18:44:27 -04:00
Sally Coolatta
60e80d876d Improve quake effects
- Quake epicenter + radius now work.
- Since quake epicenter works, removed the display player check on all of the quakes, so other players can feel them.
- Multiple quake effects are stored in a linked list and dynamically created/freed, so they can stack together.
- Made in china
- Made the quake effects only work on the z axis.
- Quakes now alternate their intensity and dampen it over time, instead of randomly picking values.
- Added quake effects for offroad and stair-jank
- Disabled quakes in reducevfx
- Removed actionmovie and windowquake (sorry jartha)
2023-05-01 14:24:32 -04:00