Commit graph

2249 commits

Author SHA1 Message Date
toaster
35ca8e6191 UCRP_SPEEDOMETER
Provide a percentage between 100 and 999 inclusive.
Reach that speed on the speedometer at any point during the race to achieve the condition.
2023-10-17 22:53:40 +01:00
Lat
dc6bb1bfa9 solve conflicts and update to master 2023-10-07 11:15:47 +02:00
James R.
0b7a6ed7f5 P_DemoCameraMovement: use splitscreen ticcmd 2023-10-03 21:28:34 -07:00
James R.
7b3010c93d Fix many instances of splitscreen view number if there are duplicate displayplayers
- Avoid iterating displayplayers to find view number and
  prefer R_GetViewNumber.
- Iterate over all matching displayplayers if necessary,
  instead of stopping at the first match.
2023-10-03 21:28:33 -07:00
Oni
bcc8fc6438 Merge branch 'freeze' into 'master'
Mobj thinker freeze condition rework

Closes #690

See merge request KartKrew/Kart!1505
2023-10-02 05:42:19 +00:00
toaster
bee1cb9a04 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into rideroid-hardcode
# Conflicts:
#	src/sounds.c
2023-09-26 21:39:19 +01:00
Lat
a565d923c0 Hardcode these cursed seasaws 2023-09-22 18:14:38 +02:00
James R.
472f7d060c Kill HW3SOUND related code (in files that are actually used) 2023-09-22 02:00:42 -07:00
Sally Coolatta
c9291b0f61 Mobj thinker freeze condition rework
- There's a freeze cheat bool to freeze everything except for players.
- There's a level freeze bool to freeze literally everything.
- There's a frozen bool on mobj_t to explicitly control freeze status on an object.
2023-09-18 03:24:58 -04:00
toaster
f9dfdf2152 GTR_CHECKPOINTS when alone: Force a level restart when player has been dead for a second 2023-09-16 23:31:01 +01:00
Sal
0675a4e527 Tally screen 2023-09-09 05:27:55 +00:00
Eidolon
ea8e7fc2d1 Invert freecam turning in encore
Fixes KartKrew/Kart#652
2023-09-03 18:52:11 -05:00
toaster
fc075b24b4 Merge branch 'gp-lives-steenky' into 'master'
Lives & Rings Cleanup (resolves #647)

Closes #647

See merge request KartKrew/Kart!1447
2023-09-01 20:43:24 +00:00
VelocitOni
8845700c06 Starpost Gentrification
Replaced all mentions of starpostnum and Starpost w/ cheatchecknum and CheatCheck (so Ivo can stop asking why we still need it when its going to save our asses on release patches)
2023-09-01 00:31:49 -04:00
toaster
a44576ad8d Fix some issues with Rings in Grand Prix
- Store a netsynced SINT8 `hudrings` on the player struct which stores the last rings the player has during play
    - So this doesn't get updated after you finish the level
    - Fixes the issue where the bot ghost that inhabits your body after finishing will use your rings, muddying how many you took into the total
- Fixed order of operations that prevented lives earned with GP rings from being given
    - Also uses hudrings for consistency
- Make the life-give context in P_DoPlayerExit cleaner
    - GPEVENT_NONE
    - no GTR_SPHERES
2023-08-31 21:55:25 +01:00
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
James R
fd346db927 Merge branch 'safer-fastfall-momentum-reset' 2023-08-28 00:55:00 -07:00
James R
b8b286b177 Merge branch 'softer-stumble' into 'master'
Smoothlanding leniency (resolves #602)

Closes #602

See merge request KartKrew/Kart!1428
2023-08-28 07:49:20 +00:00
James R
652792ddd3 K_KartSpindash: reorganize so fastfallBase doesn't need to be reset on landing
Makes resetting fastfall due to special conditions more
straightforward, because you don't need to reset
fastfallBase also.
2023-08-27 04:36:09 -07:00
James R
eabef184f1 Add P_ResetPitchRoll 2023-08-27 04:17:16 -07:00
toaster
79699f47d5 Sealed Star finish cleanup
- No FINISH text
- No voices
- Warp sound on crossing the line, not any other stuff
2023-08-26 23:48:18 +01:00
toaster
6fb7d16c85 Don't give extra lives in the final entry on a Round Queue (which fixes sealed star sound overload) 2023-08-26 23:47:36 +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
Oni
9bbd850d74 Merge branch 'cvar-reorganization' into 'master'
Refactor cvar definitions completely, move everything to cvars.cpp

See merge request KartKrew/Kart!1422
2023-08-26 03:42:31 +00: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
Sally Coolatta
3c14931764 Merge master 2023-08-25 18:39:01 -04:00
Sally Coolatta
ffda097421 Fix no control toggle 2023-08-25 05:05:51 -04:00
Oni
852e2c1035 Merge branch 'acs-game-over' into 'master'
ACS script type for game over (lose GP round with no extra lives), improve MapWarp and add a handful of functions

Closes #591 and #572

See merge request KartKrew/Kart!1403
2023-08-21 16:50:18 +00: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
7b9665402a P_ForceLocalAngle: reset ticcmd angles and localsteering
For Sealed Stars, restarting the level after turning away
from the spawn angle. This would slightly skew your
momentum when spawning.
2023-08-19 17:03:32 -07:00
Oni
7cdf8fbfdd Merge branch 'whip-sprzoff' into 'master'
Instawhip hop adjust sprite offset instead of physical Z position + flashing nitpick

Closes #601

See merge request KartKrew/Kart!1406
2023-08-19 14:58:46 +00:00
James R
7a1e61d722 Move democam.reset_aiming to camera_t, let spectator camera even out aiming 2023-08-19 05:01:41 -07:00
James R
fcc35c1bb1 Toggle between freecam and director using C button 2023-08-19 05:01:40 -07:00
James R
697e42cecd P_DemoCameraMovement: drift button resets vertical angle 2023-08-19 05:01:40 -07:00
James R
ff447a212a P_DemoCameraMovement: even out vertical angle after toggling
After turning on freecam, the vertical angle is tilted
slightly downward (this is carried over from normal
chasecam).

Interpolate that angle back to normal while moving
forward. This makes it so you don't need to manually
adjust the vertical angle, since it would cause forward
movement to send you into the ground.
2023-08-19 05:01:40 -07:00
James R
0f9ceab817 P_DemoCameraMovement: don't let A button press from menu carry over to rise camera 2023-08-19 05:01:40 -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
fec0f13419 P_DemoCameraMovement: use locally built ticcmd from G_BuildTiccmd 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
James R
ebb79fa34b Add player_t.cameraOffset, offset chasecam Z position 2023-08-17 18:09:03 -07:00
James R
39f46a0f20 Replace music handling
(This commit does not compile. Sound test and tunes
command code needs to be ported after this.)

This is a big one. Here's the rundown:

The old music system was very direct, much of the time
just a proxy to the real sound API in i_sound.h.

You could change the music on command, but there wasn't
a consistent way to prevent some music from playing over
others. P_RestoreMusic is one example of needing to
address this problem. The jingles system was intended as
another solution. Furthermore, sound test (Stereo) has its
own needs.

I am removing all of that. Music handling in general is
now a very deliberate system, kind of similar to jingles.

In the new system, "tunes" are registered. The tune stores
info such as whether it should loop or fade out. Most of
the configuration is intended to be initialized only ONCE.
Tunes can be mapped to an actual music lump. They can be
remapped at any time too.

Tunes are also configured with a priority number. This
determines which tune is heard, if multiple are supposed
to be playing at a time. You can even tell a tune how long
it should play, so it's unnecessary to track this with
bespoke timers.
2023-08-06 17:31:45 -07:00
James R
646701c55c Remove Lua Music API
In preparation for replacing music handling entirely.
Eventually, we can make a new Lua API.
2023-08-05 16:26:53 -07:00
AJ Martinez
5a703240bd Slow down level music in Encore - "vape mode" 2023-08-01 19:04:30 -07:00
toaster
2fd7c7717c P_StartPositionMusic
Consistently sets position or encore hum for multiple contexts
Now can be used in P_RestoreMusic for restoration purposes
2023-07-22 18:55:49 +01:00
toaster
050fa56d64 Merge branch 'player-pointer-deletion' into 'master'
Player Pointer Deletion

Closes #529 and #576

See merge request KartKrew/Kart!1341
2023-07-19 14:23:19 +00:00
toaster
0b3ebb0686 Kickstart Accel indicator sound modifications
- Play in replays/as spectator
- Do not play for bot-controlled players (exiting, Podium, etc)
2023-07-18 18:04:54 +01:00
toaster
ce08ac0f33 General tidy of mobj_t pointers on player_t struct
- CL_ClearPlayer
    - Delete followmobj, stumbleIndicator, and sliptideZipIndicator
    - Wipe flickyAttacker and powerup.flickyController
- G_PlayerReborn
    - Properly destroy the Follower and its bubble overlays, etc
    - Ensure ringShooter pointer is kept
    - Delete followmobj, stumbleIndicator, and sliptideZipIndicator
    - Wipe flickyAttacker and powerup.flickyController
- P_PlayerThink
    - Ensure all invalid pointers are erased, even on hitlag frames
2023-07-18 15:50:39 +01:00
AJ Martinez
9ebfc12167 Only use ticmiss input-steering if we didn't use it last tic 2023-07-06 16:04:28 -07:00
AJ Martinez
edfd43ce81 Use input steering (not camera steering) on skipped tics 2023-07-03 16:35:52 -07:00