Commit graph

363 commits

Author SHA1 Message Date
toaster
4379c62276 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into other-progression 2023-11-13 14:45:17 +00: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
AJ Martinez
6cbfc5aead Merge branch 'postrace-cleanup' into 'master'
Don't do gameplay controller vibration after finishing

See merge request KartKrew/Kart!1587
2023-11-10 23:49:31 +00:00
Gustaf Alhäll
208601e38d Cache and reuse removed mobjs when spawning mobjs 2023-11-05 15:44:53 -06:00
toaster
1ac64dc0ed Assorted minor tidyup while handling previous commits in this branch 2023-11-05 00:01:44 +00:00
toaster
dce2c73df1 thinker_era
A first pass in attempts to fix crashes when ACS causes map changes.
Frustratingly still got a crash, but I think this is definitely the right foundation to work with.
2023-11-04 17:11:59 +00:00
AJ Martinez
7dba0c9aba Don't do gameplay controller vibration after finishing 2023-10-27 23:31:08 -07:00
AJ Martinez
dcaa1c3902 Don't skip signature check steps if server is lagging 2023-10-15 14:38:55 -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
Sally Coolatta
e6a19362fc Center mobj quake on the z axis 2023-09-23 07:57:54 -04: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
James R
e83923a365 Checkpoints: add object configuration, collision, animations
This commit handles everything except actually respawning
the player at a checkpoint.

- Checkpoints are formed by two checkpoint things (2030):
  - thingarg0 - The ID for the checkpoint. Must be the
                same for these two things, and these two
                things only. ID cannot be 0.
  - angle - The direction the player is intended to face
            after respawning. Must be the same for both
            things.

- Each checkpoint thing is a starpost with a stick and an
  orb at the end.
- By default, the sticks are lowered to horizontal and
  face toward the opposite starpost.
- Rainbow tether sparkles form a field between the two
  starposts.
- When a player crosses between these two starposts, each
  spins in the direction that the player crossed. The
  sparkles also fly out in that direction.
- Over time the sticks pivot upward.
- When the starposts are done spinning, the sticks will be
  pointing straight upward.
- Orb at the end of the stick begins flashing when the
  starpost is done spinnning.

- Players may cross multiple checkpoints.
- When this happens, any previously activated checkpoint
  will have its stick lowered back to horizontal, and its
  orb will stop flashing.
2023-09-16 21:46:22 +01:00
Sal
0675a4e527 Tally screen 2023-09-09 05:27:55 +00:00
AJ Martinez
3aabdb4e98 Less extreme shrink darken 2023-09-01 20:50:46 -07:00
AJ Martinez
d3316ff614 Shrink growtime 2x, global darkness when using shrink 2023-09-01 20:40:52 -07:00
Sally Coolatta
16e6aa423e Dialogue 2 2023-08-24 17:28:53 -04:00
James R
83f02231e3 Replace spectator movement with demo freecam 2023-08-19 05:01:40 -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
Oni
a18982dc55 Merge branch 'splatbooster' into 'dashrings'
Hardcode MT_SNEAKERPANEL & MT_SNEAKERPANELSPAWNER

See merge request KartKrew/Kart!1349
2023-07-29 18:28:48 +00:00
Lach
fd8ba4236d Hardcode MT_SNEAKERPANELSPAWNER & adjust FF_GLOBALANIM behaviour 2023-07-29 17:51:25 +10: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
James R
f5d68783fc Battle UFO spawning behavior
- MT_BATTLEUFO_SPAWNER args[0] is the ID
- Spawn a random UFO from the list spawner at the start of
  Battle
- UFO spawns 200 units above the spawner
- After destroyig a UFO, wait 25 seconds before spawning
  the next UFO (next ID in the list)
2023-06-29 19:49:35 -07:00
toaster
5a3ed5464e P_Ticker: Do not start position music or play noises if gametype has no time between intro and start 2023-06-03 14:18:01 +01:00
toaster
1821b4f52d P_InitThinkers: Handle several important mobj cleaning tasks in one place, rather than scattered
- titlecam.mobj cannot have P_SetTarget applied when initially setting to NULL, as its previous occupant is some unknown region in memory, and modifying the reference count could in fact change some random number or address ANYWHERE IN THE ENTIRE PROGRAM.
- So we straight up wipe it rather than referenced-unset it in one place, always, for general tidiness.
- Also move skyboxcenterpnts, skyboxviewpnts, and iquetail/iquehead so it's all centralised.
2023-05-31 12:49:51 +01: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
toaster
3d9d9ba1e6 P_Ticker: Do not run antigrief detection if there are no waypoints 2023-05-01 17:10:02 +01:00
toaster
ab68be49e1 cv_antigrief
- Increments a timer on human players who aren't making progress, does it even faster if they're going backwards.
    - Only applies in:
        - Netgames
        - GTR_CIRCUIT after the timer starts
        - If there's no timelimit, pointlimit, or K_Cooperative (because unproductive behaviour there will be punished by other rules)
    - The rate at which this changes needs trial and error, but getting the feature functional is more important to start out with.
- If this timer reaches cv_antigrief's value in seconds , the player gets a "Grief Strike"
    - This doesn't happen if:
        - There's only one active player in the server, so FREE PLAY permits mappers to test what increments/decrements the counter
            - Turn `debugwaypoints` on to observe this
        - The cvar is set to 0
    - Less than 3 grief strikes is a forced spectate
    - Anything more is a kick via "automatic grief detection"
        - Unless your node is the host (or an admin)
    - Remove grief strike strike for finishing normally

# Conflicts:
#	src/d_clisrv.h
2023-05-01 16:57:35 +01:00
toaster
d4dbc1fe30 P_Ticker: Seperate out local player device rumble handling into its own inlineable function
Clears some space for antigrief handling
2023-05-01 16:57:34 +01:00
toaster
83fc8110ba Versus music: *Also* begin at tic 1, not 3 2023-04-30 21:48:02 +01:00
toaster
581567dfae musiccountdown
A system for level completion jingles.
- G_Ticker
    - Call P_EndingMusic after a certain amount of time has elapsed to begin a jingle
    - Play O_RACENT after the jingle's completion instead of baking it or an equivalent into the music
- P_EndingMusic
    - Change the function signature to not take a player
    - Pick from a series of const char* jingles, instead of sprintfing into a buffer
        - _first
        - _win
        - _lose
        - RETIRE
    - Simplifying logic to handle intermission music
2023-04-30 21:47:07 +01:00
toaster
f65471f609 P_Ticker: Encore map intro hum starts at tic 1, not 3, after experimental intro timer merger 2023-04-30 20:31:07 +01:00
James R
e8a8064da9 P_Ticker: update view interpolation at the start of a tic
This lets R_ResetViewInterpolation only need to be called
once from game logic.
2023-04-22 20:40:35 -07:00
toaster
43b1686abf Controller rumble if Stairjank is affecting your momentum directioning
Uses the same strength as offroad because of how it's functionally equivalent in Sealed Star stages
2023-04-12 23:08:50 +01:00
James R
9eab5317f3 Stop calling P_NullPrecipThinker
In levels with tens of thousands of precipmobjs, the
overhead of running a thinker for all of them is too much,
no matter how small the thinker is.

ALL thinking is done inside the renderer now, where it can
be limited by distance. Precipmobjs track the last
leveltime they thunk, so interpolated frames don't think
twice.
2023-04-08 13:34:42 -07:00
toaster
8c58cde072 Rumble: Also vibrate on the first half-second of a sneaker (panel), attenuating in strength with numsneakers. 2023-04-03 00:13:17 +01:00
toaster
6942298862 Adjustments to Rumble
- Cause more intense rumble for damage/damage-causing hitlag
- Reduce intensity for offroad/bananadrag rumble
2023-04-02 23:55:16 +01:00
toaster
380beaa023 Refactor Rumble condition check to iterate over splitscreen players once in p_tick.c, instead of players*splitscreen players in k_kart.c 2023-04-02 23:49:45 +01:00
Oni
dec66ee9b1 Merge branch 'jam-project' into 'master'
Stereo Mode

See merge request KartKrew/Kart!1097
2023-03-31 01:07:38 +00:00
Sal
83b5b26a12 Merge branch 'packet-hack' into 'master'
Experimental: Improve level load processing

See merge request KartKrew/Kart!1077
2023-03-28 23:41:33 +00:00
toaster
9a343bd465 mapheader_t: PositionMusic property
A little off-piste, but a trivial addition since I'm changing this part of the code.
- Plays in Position outside of Encore
- Shows up first in the Sound Test sequence for that map
2023-03-28 15:14:09 +01:00
James R
2547ba6d6b Merge branch 'fix-faulty-references-false-positive' into 'master'
Fix false positive P_RemoveThinkerDelayed warning

See merge request KartKrew/Kart!1087
2023-03-27 12:07:40 +00:00
Oni
b9bbb6cb8a Merge branch 'conditions-cascading' into 'master'
Conditions Cascading

Closes #366

See merge request KartKrew/Kart!1053
2023-03-23 23:51:30 +00:00
James R
1949e9eebb PARANOIA: delay P_RemoveThinkerDelayed warning by 2 tics
MT_ITEMCAPSULE_PART can be delayed by this much it seems.
2023-03-23 15:23:09 -07:00
Chromatian Keiske
fd122e7d62 Merge branch 'paranoia-mobj-reference-count' into 'master'
Tune up PARANOIA warnings for mobj reference count

See merge request KartKrew/Kart!1070
2023-03-23 08:11:04 +00:00
Sally Coolatta
ffb65a3583 Experimental: Improve level load processing
- P_PreTicker ("defrosting") is dead. Levels now actually start on tic 0 instead of tic 2.
- Netxcmds are ran before G_Ticker, instead of after.
- All netxcmds are required to be processed before the level will finish loading (up to 5 gametics, to prevent any possible lock-up from malicious clients).
2023-03-22 10:59:29 -04:00
James R
15edab5e85 Delay spawning level sign posts, do not use youfuckedup face for tied sign posts
- Sign post spawning is delayed until after thinkers have
  run. This lets ties be tallied.
- Spawn normal (non error) sign for ties.
2023-03-20 20:59:12 -07:00
James R
17aaf178d5 PARANOIA: fix faulty references warning
- Print mobj address and mobj type in addition to
  reference count
- Print negative reference counts correctly
- Don't print warning twice for the same mobj (don't spam
  the console)
2023-03-20 19:57:00 -07:00
James R
509a023329 PARANOIA: add debug to P_SetTarget if references go negative
Prints mobj address, mobj type, thinker function,
reference count and source code line number.
2023-03-20 19:57:00 -07:00
James R
55467d190a Fix code formatting in P_SetTarget 2023-03-20 19:40:57 -07:00
toaster
4c0077e07c Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into conditions-cascading 2023-03-19 13:01:06 +00:00