Commit graph

110 commits

Author SHA1 Message Date
James R
7abe285f84 Refactor: replace references to cv_timescale with I_GetTimeScale 2024-03-18 02:42:21 -07:00
James R
244d5e1063 Attract: play demo for 30 seconds, starts at random timestamp
- Starting timestamp is not truly "random"
  - Uses a lookup table because I didn't like the PRNG
    distribution
2024-03-18 02:42:21 -07:00
James R
326e560329 Attract: fix attract demos end handling
Fixes two bugs:

- Attract mode carrying over to gameplay if an attract
  demo is allowed to finish without interrupting it
- Credits ending after the first replay ends
2024-03-18 02:42:21 -07:00
AJ Martinez
bb7c00171c Merge branch 'continuous-music-option' into 'master'
Continous Attack Music option

See merge request KartKrew/Kart!2105
2024-03-16 04:02:24 +00:00
AJ Martinez
d8ae4d9550 Merge branch 'staff-ghost-fixes' into 'master'
Fix staff ghost bugs

See merge request KartKrew/Kart!2115
2024-03-16 04:02:19 +00:00
SteelT
e7f2afdcb2 Fix RNG sync when in attract mode
P_ResetLevelMusic is not called during attract mode to advance the MUSICSELECT RNG
Resulting a warning (although harmless) about playback sync
2024-03-15 03:14:50 -04:00
James R
630e02217d Free ghosts when level data is freed 2024-03-14 01:27:16 -07:00
James R
d3034bba54 Menus/Sound Options: add Continuous Attack Music option
- On by default (current behavior)
- Off
  - Restart music in Attack modes
  - Also plays POSITION music
2024-03-13 22:43:35 -07:00
AJ Martinez
a79b93d2eb Merge branch 'title-credit-attract' into 'master'
Show titlescreen music credit when a title demo is loaded

See merge request KartKrew/Kart!2083
2024-03-12 00:07:36 +00:00
SteelT
7286886265 Show titlescreen music credit when a title demo is loaded
Fixes missing titlescreen music credit when watching a title demo
2024-03-10 23:09:16 -04:00
toaster
6e46f97847 As promised, Encore (alt)music
- `EncoreMusic` on mapheader
    - Supports up to 3 alt musics, as with every other type
- Do not vape/nightcoreify if provided
- To avoid complicating the Alt Music logic too much, uses "side B" of the same Prison Egg CD
    - That is to say, if there are 2 encore tracks and 3 normal tracks, the second Encore track will only play if you've gotten the CD associated with the second normal track

I haven't actually tested it *with* any Encore music, but I've triplechecked literally everywhere to make sure it didn't break standard play
2024-03-10 21:18:15 +00:00
toaster
7db5094577 Alt music: Don't destroy cache_muslock data when replacing the music in the mapheader 2024-03-10 21:17:20 +00:00
Gunla
20ecc22ccf Merge branch 'blend-end' into 'master'
Blend End

See merge request KartKrew/Kart!2039
2024-03-10 20:30:38 +00:00
toaster
8180033ae1 Since Versus intros have special behaviour in time attack, also allow them to avoid the white fade/warp sound of MapWarp 2024-03-09 20:33:24 +00:00
James R
556035687c Versus: always reset music, even in Time Attack 2024-03-09 06:35:53 -08:00
James R
9e99efc08c Refactor level music playing code
- Use one function so we don't duplicate the checks for
  music that isn't supposed to be interrupted by a restart
2024-03-09 06:32:37 -08:00
AJ Martinez
279d802959 Faster TA tally, new TA music 2024-03-06 20:19:51 -07:00
SteelT
e97de3d6f3 Merge branch 'master' into reloadmap-fix 2024-03-06 16:03:11 -05:00
toaster
abc48d7546 Invert behaviour in modeattacking 2024-03-06 20:09:34 +00:00
toaster
7f0df71558 R_SkinAvailableEX
- Most R_SkinAvailable calls should be returning index into demo.skinlist (same numerical value as when demo was recorded), for demo sync
- A handful of general things permit exception for this
- Expose `replaynumskins` (calculated as `(demo.playback ? demo.numskins : numskins)`) to Lua
    - There's *always* more that can be done for this, but this is the minimum spec that can at least be somewhat stable
2024-03-05 13:21:38 -08:00
toaster
24b850a492 LoadRecordGhosts: Use local unlock state, not consoleplayer availabilities (which might not be set yet) to determine whether a ghost should be visible 2024-03-05 13:21:38 -08:00
James R
9f982a574e Add LapsPerSection property to map headers, fixes finish line distance in hybrid section-circuit maps
- It is possible to have a circuit map separated into
  sections, where there are multiple "laps" before making
  a full loop
- Normally the lap count is used to multiply the finish
  line distance, but it fails for these maps
- The LapsPerSection property fixes the calculation by
  specifying how many laps make up a full loop
  - Default = 1 lap (most maps)
2024-03-03 03:06:52 -08:00
Oni
19555bcdc9 Merge branch 'fix-waypoint-errors-titlemap' into 'master'
Don't initialize waypoints in GS_TITLESCREEN

See merge request KartKrew/Kart!1983
2024-03-03 01:57:36 +00:00
Eidolon
915d997b79 Don't initialize waypoints in GS_TITLESCREEN
Fixes error logs when titlemap loads
2024-03-01 18:43:00 -06:00
Eidolon
20cb01fb94 (demo v9) Demo save unlocks and mapmusrng
Fixes KartKrew/Kart#1093
2024-03-01 17:27:41 -06:00
toaster
d1ebd9a2d1 Make Special Mode time attack match Normal GP behaviour, as requested for practice 2024-02-26 20:25:08 +00:00
Oni
74bfac57e4 Merge branch 'time-attack-annoyances' into 'master'
Time attack annoyances

Closes #1062 and #1064

See merge request KartKrew/Kart!1947
2024-02-25 07:23:49 +00:00
Eidolon
f4f7c5b1eb Add fault start mapthing 36 and prefer it for TA
Fixes KartKrew/Kart#1063
2024-02-24 19:15:00 -06:00
Eidolon
217f19158f Play and don't reset nonsynced level music in TA
Fixes KartKrew/Kart#1064
2024-02-24 18:07:57 -06:00
Eidolon
3c63b84299 Skip titlecard for modeattacking except VERSUS
Fixes KartKrew/Kart#1062
2024-02-24 17:38:28 -06:00
toaster
b70e59755f Tie SPB Attack and Encore together
- A method to access Encore in Time Attack
    - so we have SOME Encore singleplayer content on launch
- Also available for Versus mode (in Special Attack)
    - Finally, Encore rematches have a way to access them!
    - Obviously will not spawn a chasing SPB, it's just a signal for "hard mode"
- Relevant gametype + unlock checks have been abstracted into M_EncoreAttackTogglePermitted
2024-02-17 23:11:58 +00:00
toaster
3f78c9d2e6 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into separate-spb-attack-records
# Conflicts:
#	src/menus/play-local-race-time-attack.c
#	src/p_setup.cpp
2024-02-11 23:27:33 +00:00
James R
d7e0a4d01a Add S_LoadSongCredit/S_UnloadSongCredit, refactor cursongcredit
- cursongcredit behaves the same as before
- Always compose song credit string
- g_realsongcredit always stores the song credit for the
  current music, even if no song credit is displayed on
  the HUD
2024-02-09 18:13:35 -08:00
James R.
6b831a0fa2 Merge branch 'fix-show-character-ghosts' into 'master'
Time Attacking: fix "Show Character" option for ghosts

Closes #1013

See merge request KartKrew/Kart!1896
2024-02-09 23:47:50 +00:00
James R
56e710266c M_TokenizerOpen: pass size in as argument instead of calling strlen implicitly
This function is used for parsing TEXTMAP and the data is
not NUL-terminated.
2024-02-08 18:16:41 -08:00
Eidolon
0e1f688139 Merge branch 'allow-battle-capsule-in-tutorial' into 'master'
Allow MT_BATTLECAPSULE to spawn in tutorials

Closes #949

See merge request KartKrew/Kart!1890
2024-02-06 01:45:18 +00:00
Eidolon
5d33c19974 Merge branch 'mandatory-udmf' into 'master'
Make UDMF mandatory for play

See merge request KartKrew/Kart!1889
2024-02-06 01:00:27 +00:00
Oni
4ea946067a Merge branch 'srb2-tidy' into 'master'
Clear out unused SRB2/Kart stuff from info tables

See merge request KartKrew/Kart!1811
2024-02-03 19:40:52 +00:00
James R
b0538a5271 Time Attacking: fix "Show Character" option for ghosts
- player_t.skin is not set yet, so use cv_skin and
  R_SkinAvailable instead
- Refactor P_LoadRecordGhosts to de-duplicate some code
2024-01-30 19:18:51 -08:00
Eidolon
007fbc52da Make UDMF mandatory for play
As per many previous conversations, we need to enforce the UDMF
requirement now if we want to introduce a new hardware renderer in the
future. Requiring UDMF ensures that maps are always built with extended
nodes, which both solves vertex imprecision issues and ensures all
subsectors are closed, making writing a hardware renderer significantly
easier and less prone to subsector bugs.
2024-01-29 19:38:26 -06:00
Eidolon
f975df6d6d Allow MT_BATTLECAPSULE to spawn in tutorials
Fixes KartKrew/Kart#949
2024-01-29 18:48:49 -06:00
Sal
3958c15dfe New Credits 2024-01-28 23:31:30 +00:00
James R
378fb8ed07 Save SPB Attack replays with "spb-" in the file name
- Files
  - spb-time-best
  - spb-time-lap
  - spb-last
- Menu
  - Toggling SPB Attack refreshes the menu (to show/hide
    certain replay options)
2024-01-27 04:30:38 -08:00
toaster
6fdec66dc3 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into srb2-tidy 2024-01-26 00:29:06 +00: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
Oni
973d5ba658 Merge branch 'objective-hud' into 'master'
Add persistent objective messages via K_AddMessage, expose to ACS

See merge request KartKrew/Kart!1843
2024-01-20 00:19:17 +00:00
AJ Martinez
c5bafc7b4c Clear HUD messages on level transition 2024-01-18 14:55:10 -07:00
Sal
9382031337 OpenGL sprite+model directional light 2024-01-17 12:05:12 -08:00
Oni
a86f8a1508 Merge branch 'sealed-star-exit-fade' into 'master'
Sealed Star: fade out music near the finish line

Closes #622

See merge request KartKrew/Kart!1842
2024-01-17 04:56:51 +00:00
Oni
379cb55e86 Merge branch 'automedal-timing-adjustment' into 'master'
Round times, add best * 110% as another gold time

See merge request KartKrew/Kart!1797
2024-01-17 01:36:30 +00:00