Commit graph

353 commits

Author SHA1 Message Date
AJ Martinez
2dcfd9542f Instawhip polish round bleven 2023-06-11 20:29:43 -07:00
Sally Coolatta
d55c9038cc Bots: Can now use Ring Shooter
Reuses most of the anti-grief code, but with a very low timer (5sec) and they simply hold Y when reaching it until they eventually respawn from the ring shooter.
2023-05-14 19:32:51 -04:00
toaster
12ecb1f7a4 P_DoPlayerExit changes
- Add flag application in function signature
    - Consistent gating of extra PF_NOCONTEST application behind not already exiting
        - This should fix dying after winning in K_Cooperative gametypes breaking things
- P_DoAllPlayersExit
    - Consistent condition of playeringame, spectator, exiting, etc checks
    - Also could force-give a life (for Battle Prisons)
2023-05-02 18:16:26 +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
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
Oni
1c9ee9f907 Merge branch 'chunky-items' into 'master'
Bigger, chunkier items test

See merge request KartKrew/Kart!1177
2023-05-01 03:28:52 +00: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
74d6445a56 Integrate Ring Racers jingles into the inherited-from-SRB2 JT_ jingle system
Most of this work was completed last year by Sal.
- JT_INVINCIBILITY
- JT_GROW
Future work:
- Actually use the S_RecallMusic system (for some reason it doesn't play nice so had to disable it)
2023-04-30 20:50:12 +01:00
Sally Coolatta
833131b319 Make MAXRADIUS bigger
MAXRADIUS was previously an arbitrary value id Software set as whatever their biggest object would be (which they broke that rule anyway). It is now the radius of a blockmap block, which should be a large enough of a nudge value to handle all cases. (Still don't recommend making objects any bigger than a Spider Mastermind though.)
2023-04-30 10:31:26 -04:00
Sally Coolatta
85eaf2eeea Make camera follow platform momentum 2023-04-23 14:51:29 -04: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
James R
bced5ecbc5 Render precip through blockmap instead of during BSP
There can be very many precipmobjs in a sector. During BSP
rendering, for each sector reached by BSP (the entire
visible level at least), all the precipmobjs would be
iterated and their distance from the camera calculated, to
determine whether they are within draw distance.

The issue with the old approach is that there really are
too many precipmobjs in each sector. By iterating the
blockmap within a certain range instead, precipmobjs
out of view are not iterated at all, saving some time.

Caveat: drawdist_precip is no longer respected as an
exact value, since it must round to the precision of the
blockmap.

List of potentially scary changes:

- Removes snext/sprev for precipmobj_t
- Removes preciplist for sector_t

- Adds bnext/bprev for precipmobj_t
  - mobj_t and precipmobj_t field offsets are symmetrical

- Modified P_SetPrecipitationThingPosition and P_SetThingPosition
  - The syntax in these functions is kind of wacky
2023-04-06 05:41:06 -07:00
James R
67f4505a06 Revert "Add cv_scrambleremoved, disable scramble on P_RemoveMobj"
This reverts commit a55ddef528.
2023-03-20 19:57:00 -07:00
James R
aa927a5b00 Merge branch 'overtime-spectator' 2023-03-07 01:45:16 -08:00
James R
a55ddef528 Add cv_scrambleremoved, disable scramble on P_RemoveMobj
Because Monitors and players leaving leak references,
disable this crashing to be able to test other stuff at
least.
2023-03-06 22:55:01 -08:00
Sally Coolatta
9501b57296 Extend cut-away view functionality
- arg2: TID of an object to make the camera's angle/pitch follow.
- arg3: Zoom tube waypoint sequence to start following.

- Ceremony uses one-screen, regardless of previous splitscreen-ed-ness
2023-03-03 16:09:55 -05:00
James R
b3511a9149 Player orbiting physics 2023-02-28 20:27:11 -08:00
James R
8770d76a4e Add P_SpawnMobjFromMobjUnscaled, does not scale offsets 2023-02-18 14:39:43 -08:00
Oni
f57dd43e36 Merge branch 'minigen' into 'master'
minigen

See merge request KartKrew/Kart!900
2023-01-25 05:54:12 +00:00
toaster
6a723cff58 Support for user-specified minimap bounds
The totally-not-a-secret reason I made this branch.
- doomednum 770 (associated with polyobject anchors 760/761 and skybox centerpoint 780)
- Place exactly two in a map to draw an implicit rectangle.
    - Supports top-left/bottom-right AND bottom-left/top-right placements.
    - I_Errors if you place too many (or only one).
- You don't *have* to have these, this is just a bonus if you're a map like Power Plant or CDSS1 negatively affected by your skybox.
2023-01-24 17:57:56 +00:00
toaster
223531ffce Precalculate as much shared minimap/automap data on level load as possible
- `P_InitMinimapInfo`
    - Writes to `p_local.h` extern struct
    - Handles everything previously distributed across multiple K_drawKartMinimapIcon calls (and most of AM_findMinMaxBoundaries)
- Reduces complexity of drawKartMinimapIcon significantly
- Last prerequisite before implementing user-placable minimap boundaries...
2023-01-24 14:46:25 +00:00
toaster
ceed74d052 Stumble damagetype
- DMG_STUMBLE in SOC, hardcode
- Has sector type
    - UDMF: damagetype = "Stumble"
    - Binary: Sector type 9, section 1
- Can be chained even when invincible, unlike Tumble
- Will never instinctively cause hitlag
2023-01-22 14:56:42 +00:00
Oni
13563ce922 Merge branch 'acs' into 'master'
Action Code Script

See merge request KartKrew/Kart!728
2023-01-22 03:22:32 +00:00
toaster
c7525fb5a6 Introduce MT_OVERLAY exception flags
- Applied via threshold of Overlay mobj
    - OV_DONTSCREENOFFSET
        - spritexoffset, spriteyoffset
        - Given to Item Capsule quantity numbers
    - OV_DONT3DOFFSET
        - sprxoffset, spryoffset, sprzoffset
    - OV_DONTXYSCALE
        - spritexscale, spriteyscale
    - OV_DONTROLL
        - rollangle, pitch, roll
Makes overlay on UFO emerald follow the emerald's spriteyoffset now
2023-01-08 18:16:04 +00:00
Sally Coolatta
345e7f83b0 Copy first mapthing tag to their mobjs
Allows the ThingCount and ThingSound ACS functions to fully work now, and adds significantly more possibilities for scripting later.
2023-01-01 17:07:46 -05:00
Eidolon
be021baa02 Add extern "C" in C++ to all headers 2022-12-30 19:26:16 -06:00
toaster
8e88a840bb Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into unlockables-undefeatable
# Conflicts:
#	src/k_menudraw.c
#	src/k_menufunc.c
2022-12-19 20:13:44 +00:00
James R
4281adc60d Separate most of P_DoSpring into P_DoSpringEx 2022-12-18 21:09:29 -08:00
toaster
803490d7aa Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into unlockables-undefeatable
# Conflicts:
#	src/d_clisrv.h
#	src/doomstat.h
#	src/g_demo.h
#	src/m_cond.h
2022-12-10 21:54:58 +00:00
James R
abdb2e3ac3 Set Lightning Shield attack to DMG_VOLTAGE 2022-12-05 13:04:47 -08:00
toaster
8b1407c096 Proper MP emblem support
- Also adapted from (STJr/SRB2!1756)
- Unlike that MR, absolutely no sharing - this is a game of exclusively competitive gametypes.
2022-11-30 14:32:33 +00:00
James R
051b4f8935 Always use typedef name instead of struct name
mobj_t instead of struct mobj_s
2022-11-27 17:21:40 -08:00
James R
b5310a1f68 Add typedef.h
All typedefs for structs that were present in other header
files have been moved to here. (Except node_t because the
renderer and netcode both define node_t LOL.)
2022-11-27 17:21:40 -08:00
Sally Coolatta
0053cda35c Don't allow nextwaypoint to be past finish linedef 2022-11-26 02:51:46 -05:00
Sally Coolatta
8f5e0f63e9 Evict the wall gremlin
Gremlins happened whenever P_TryMove and P_SlideMove/P_BounceMove disagreed on what an object collided with. When TryMove said you collided with a line, but P_BounceMove said that you didn't, then you'd get gremlin'd.

To fix this, P_TryMove now can edit a struct to contain information on what it collides with. P_SlideMove and P_BounceMove no longer try to detect walls on their own and now requires this result from P_TryMove. If a slide/bounce is needed without moving the object, then you'd want to use P_CheckMove to get the result.

Lua is not supported right now.
2022-11-21 16:12:53 -05:00
Sally Coolatta
35f1fe580c P_RestoreTMStruct 2022-11-21 15:59:19 -05:00
Sally Coolatta
b31aa1bbb0 Put tm* variables into a struct
This makes it significantly easier to save/restore the state of these variables, whenever we need to do so for calling movement functions in the middle of other movement functions. This will also make it easier to move it out of global variable hell if desired later.
2022-11-20 19:27:34 -05:00
Nev3r
5c9599f0a9 "UDMF: The whole thing" merged
See merge request STJr/SRB2!1714

Barely any RR features reimplemented
2022-10-09 01:13:37 -04:00
James R
05dd7d7871 Merge remote-tracking branch 'origin/master' into HEAD 2022-10-01 14:45:39 -07:00
James R
ee2302d6ee Merge branch 'noclip-online' into 'master'
Cheat/Debug Commands ...ONLINE

See merge request KartKrew/Kart!717
2022-09-30 22:51:42 +00:00
James R
57a3c4109c Reset player cheat effects when disabling cheats cvar 2022-09-29 05:54:58 -07:00
Sally Coolatta
841bcf3619 Allow non-players to water skip/run
Water skipping is enabled for Orbinaut, Jawz, and Ballhog currently. Jawz can water run, as long as their target is on/above the plane they're at -- once their target goes into the water, they'll start skipping.
2022-09-27 12:31:33 -04:00
toaster
871de857ae Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into setangle
# Conflicts:
#	src/p_enemy.c
#	src/p_mobj.c
2022-09-24 20:23:35 +01:00
Sally Coolatta
acf2484def Merge branch 'master' into tumble-slope-fuck 2022-09-20 07:34:44 -04:00
James R
ba1b6bb253 Add P_CheckMove
Checks if P_TryMove would succeed without actually moving.

(cherry picked from commit 518de0ce104166c3eacd10ebe6ade422307ce671)
2022-09-05 11:56:30 -07:00
toaster
3a4b485c5d Remove P_InitAngle and its kin, considered on a case-by-case basis for also setting old_angle as well. 2022-08-25 11:35:09 +01:00
Sally Coolatta
ebb34ff9d4 Lap based power level 2022-08-14 06:00:37 -04:00
Sally Coolatta
6106ce1624 Add reversed weather
- Negative speed weather will spawn from a floor in a sector with a sky ceiling, and go up into the ceiling.
- (Not really the same as reverse gravity weather in that aspect, because that would be for sky floors.)
- Fixed invert precipitation flag for linedef type 8 being completely unimplemented. (How long has it been like this...?)
- Fix swapping weather on the fly having reversed momz
2022-06-05 05:39:35 -04:00
Sally Coolatta
d053d5f8ba Fix blockmap WILD inconsistency when it's not PIT_CheckThing
An optimized error check was put into P_BlockThingsIterator for tmthing, but this meant that anything that was not using or even setting this variable (the supermajority of them) would exit after finding 1 thing in each block.

To keep this error check & keep it optimized, the PIT_ functions were expanded to three options instead of two: BMIT_CONTINUE lets the search continue. If used as the last mobj, it will return true when the iterator finishes. BMIT_ABORT ends the search and forces the iterator to return false.
BMIT_STOP ends the search and forces the iterator to return true.
2022-05-23 17:37:29 -04:00
Sally Coolatta
f3bb8833a1 Tumble when not landing upright on slopes 2022-03-28 17:10:27 -04:00