Commit graph

59 commits

Author SHA1 Message Date
Wumbo
7d6289817d Fix ground followers phasing through FOFs 2025-10-06 11:43:59 -04:00
toaster
4bc99d3806 De-jank all existing calls to K_FlipFromObject/K_MatchGenericExtraFlags
- New funcs K_MatchFlipFlags, K_FlipFromObjectNoInterp, K_MatchGenericExtraFlagsNoInterp
- Renamed K_GenericExtraFlagsNoZAdjust to K_MatchGenericExtraFlagsNoZAdjust
- Went over each individual spot that called any of this suite to figure out what they actually wanted, and give it to them without having to work around a bad function
- I'm 95% confident there's no regressions, but I don't think I'll get that 5% by testing internally. Might just have to hand this out with RC2 with an asterisk in the changelog
2025-09-16 23:18:02 +01:00
toaster
48a155f8e7 Fix Auto-Ring follower fallback
- Move `followerready`'s first set from `K_SetFollowerByNum` (which isn't called if your follower is -1, the exact case Goddess is supposed to help us with) to `G_UpdatePlayerPreferences`, which is always called whenever the follower ID is validated on join
- Cache "Goddess"' followerskin ID by cribbing from `r_skins` and `R_DefaultBotSkin`
2025-08-23 22:20:47 +01:00
toaster
d158493bcf Start numfollowercategories at 0(!!!)
Uninitialised memory, my mistake
2025-08-22 16:07:20 +01:00
toaster
2f6d7230f0 Dumb post alert: Ease off the horn
If we're bringing the spice we have to bring the whole pepper
2025-08-17 13:06:02 +01:00
Eidolon
892a6b8620 Merge public master 2025-08-12 16:49:14 -05:00
Eidolon
255570cfca Dynamically allocate skins
This avoids an issue where the skins array takes up a fixed, but large
amount of memory at runtime. On x86_64 linux, that array is roughly 80
megabytes in memory, most of which is unused when the game is unmodded.
Instead, we treat `skins` as a dynamically resizing array, and it is an
array-of-pointers into separate allocated `skin_t`.

This is based on Lactozilla's skin limit MR for SRB2, but I've rewritten
it because RR has diverged quite a bit.

This was verified to check every access of `skins` by using clangd's
find-all-references function. However, I have only tested plain skins,
not Lua addons, so that could afford some extra checking.
2025-08-12 15:33:00 -05:00
Ashnal
f5aa2a701b Bail button
Transforms BT_RESPAWN into BT_BAIL
User bindings should migrate along with this
Respawn is now EBRAKE+BAIL
Respawn blocks LOOKBACK
Time Attack quick respawn is now VOTE
2025-06-23 18:07:59 -04:00
Eidolon
a4d304a1f5 Update copyright years to 2025 2025-02-13 15:32:26 -06:00
James R
11fce987c0 autoring: replace followerskin Goddess cases with K_GetEffectiveFollowerSkin function 2024-05-05 03:02:53 -07:00
Ashnal
d1ec829d5f Fix horn and and hitconfirm anim for fallback follower 2024-05-05 01:20:08 -07:00
James R
489bc15161 Autoring: set follower to 50% transparency if player cannot use rings 2024-05-05 01:20:08 -07:00
James R
4a239e024c Fix fallback follower 2024-05-05 01:20:08 -07:00
Ashnal
3b27feb533 Fallback follower
Ring use animation broken atm
2024-05-05 01:20:06 -07:00
Ashnal
f85cb8c400 Instead 180 from player facing angle 2024-05-05 01:18:26 -07:00
Ashnal
947b918c83 swap follower angle facing when autoring 2024-05-05 01:18:26 -07:00
Sally Coolatta
b610353699 Add follower ring animation
Add "RingState" and "RingTime" to followers. RingState is the state to use while they're giving you an auto-ring. The animation plays for RingTime tics per-ring, so it can extend to however long they need to use rings.
2024-05-05 01:18:25 -07:00
toaster
dea698a276 Tasteless Taunts
Uninhibited voices/horns (see the "meme" setting in v1).
Removes the SECRET_MEMETAUNTS unlock, which didn't fit the general level of cohesion main game content should have.
2024-04-02 23:26:57 +01:00
toaster
224deed01d More copyright updates
- TehRealSalt and Lat` are currently preoccupied, so handle their credits
- Correct some accidential copypastes of existing boilerplate into new files
- Add a handful more of mine
- Consistency for Kaito Sinclaire's online handle
2024-04-02 22:14:49 +01:00
Sally Coolatta
9b93f56111 Add pre-Podium intermission music 2024-03-10 14:08:59 -04:00
AJ Martinez
37cd05d23e Fix follower bubbles desyncing during hitlag 2023-12-30 22:12:22 -07:00
James R
d80689f0d1 K_HandleFollower: set follower punt_ref to player 2023-12-04 20:25:30 -08:00
toaster
8c734d3646 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into break-through-them-all 2023-10-07 12:42:07 +01:00
toaster
d386800c1e Ancient Shrine: Code the rest of the owl
- If a follower with the specific Mystic Melody sound effect (DSMELODY) is used on the Shrine by a local player...
- Activates the shrine after two seconds!
    - This is clientside only.
- Stores on the mapheaderinfo's mapvisited record
2023-10-06 22:24:40 +01:00
toaster
e96bae393c Ancient Shrine implementation beginning
- Players will glance at Ancient Shrines near/behind them.
- Look back at these Shrines to activate your follower's horn!
    - Currently, this even works if horns are turned off, as a sort of tutorial.
    - TODO: A special horn will be able to activate them...
2023-10-05 23:07:46 +01:00
toaster
0b1be76442 K_FollowerHornTaunt: fix mistaken port priority on horns
Incorrect behaviour sometimes prevented you from hearing somebody else's horn based on player slot order
2023-10-05 23:00:32 +01: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
AJ Martinez
687c26e219 Play horns at full volume for targeted players 2023-09-22 18:27:44 -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
bfc8036e7e Use display players for hearing/seeing horns, not local players
Matches other local effects, and permits spectators (such as in tournaments) and replay watchers to see the honk.
2023-07-18 17:53:54 +01:00
toaster
e7ee979f1a Horncode
A much more focused replacement for Hornmod, specc'd out by Tyron and Oni working together and implemented by the author of this commit because it's pretty funny.

- Followers have `hornsound` in their SOC configuration.
    - The default sound for all followers without a provided one is sfx_horn00.
- They'll play this sound if you use lookback with one following you, and there's nearby players to get the player looking all the way around.
    - Only the players who are successfully considered for lookback will hear it.
- Has a v1-like visual with less randomisation, but still netsynced.
- Also controlled by the cvar `taunthorns`, which, like `tauntvoices`, takes "Tasteful" (default), "Meme", and "Off".

TODO: make the condition for horn a little delayed, so you have to hold lookback for a little bit.
2023-06-28 17:54:23 +01:00
toaster
1429a91cd9 Increase maximum # of Followers
Surprisingly easy as it requires negative values to mark "None", so it was already out of the range of UINT8
2023-06-28 16:36:36 +01: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
0c7d66791b Expand datatype for Unlockables, emblems (Medals + nonmedals), and Conditions.
Made sure there is more than enough headroom for our current purposes.
It should be easy to double again if necessary now that the datatypes have been increased... but that would be obscene at this point
- 1024 Unlockables and 1024 Conditions (these were always tied together in slots)
- 2048 emblems (Medals + nonmedals). If we ship with ~250 maps this permits 8 Medals per map - which is higher than we intend right now but could easily fill out in patches
2023-05-30 21:08:29 +01:00
toaster
aea68c454f K_GetEffectiveFollowerColor: A follower's default color can be Match/Opposite (such as our good friend the s3k balloon), so process it before returning 2023-04-25 14:19:52 +01:00
toaster
0d203f5dbb K_GetEffectiveFollowerColor: Handle playercolor being default/NONE in a cleaner, more direct fashion
Fixes the FOLLOWERCOLOR_OPPOSITE handling being wrong in this circumstance
2023-04-25 14:19:52 +01:00
Sally Coolatta
c486ec19af SECRET_COLOR 2023-04-25 14:19:52 +01:00
toaster
3612c1afa8 K_HandleFollower: Add newlines to improve readability of sine bobbing 2023-04-20 22:57:41 +01:00
toaster
ba3a3f4203 Follower hitlag
- If a player enters hitlag, put their follower in hitlag too
- If a follower exists and is in hitlag, don't update it in K_HandleFollower
2023-01-08 16:51:58 +00:00
toaster
2aa43f04b2 Additional memory safety for follower handling 2023-01-08 16:48:43 +00:00
toaster
e7c79ab461 M_CheckNetUnlockByID
System for netsyncing unlocks, inspired by but with nowhere near as many moving parts as (STJr/SRB2!1756).
* `gamedata->unlocked[MAXUNLOCKABLES]` is duplicated to `netUnlocked[MAXUNLOCKABLES]` (or all `true` in `dedicated`
* New `local` boolean for M_SecretUnlocked
* Removed last vestiges of SRB2 special stage token code because it occupied the spot in the netsave we wanted to use.
* Correct typing of multiple `m_cond` functions that returned `boolean` constants as `UINT8`s.
2022-12-09 17:26:52 +00:00
toaster
fefaee1982 SECRET_FOLLOWER
Completely clientside, unlike SECRET_SKIN. Followers have no gameplay function, and it saves us having to write even more to our demos/netsaves. Replaces SECRET_WARP.
Also:
- Now don't apply skins or followers from profiles if the skin is locked - instead, get the closest skin in stats. (Same function as from demos!)
- If you're looking at a profile and the skin or follower are locked, make them solid colour (TC_BLINK).
- Don't show the ring cursor before you've selected a profile.
2022-12-04 01:09:08 +00:00
toaster
2e75012645 Clean up follower setting to handle strings and values just like player->skin
- Fixes defaulting to follower id 0 (previously chao, currently hot robo) when joining a server without going through the menu flow
- No need to store TWO names for a follower, so save a little memory
- Should make it easier to add unlockable followers later
2022-11-07 18:11:45 +00:00
toaster
fa5aa408be WIP: Catch a few places which could be going wrong with followers on joining servers.
Definitely better than it was, but current status: sometimes when joining a server cv_follower[n].value is 0 and I don't know why.
2022-11-07 00:58:55 +00:00
toaster
8aeaf9738d Major changes to follower selection
- Followers now have categories, definable in SOC
- New character select step: Follower category
    - "None" is a category, just skips straight to Follower None
    - Select a category to go to the previous regular follower selection step
- Press the C/Extra button to reset a character select step to its "default"
    - Character: Center the character in the engine class (goes from [0,1] to [1,1], etc)
    - Character alts: Centers the "primary" alt (prefers Eggman over Eggrobo)
    - Skincolor: Centers the character's prefcolour
    - Follower category: Centers on the "None" option
    - Follower: [CURRENTLY NO BEHAVIOUR]
    - Followercolor: Cycles between follower's defaultcolour, "Match", and "Opposite"
2022-11-06 22:53:12 +00: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
107622968e Merge branch 'master' into new-menus 2022-08-27 22:36:58 -04: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
3164199512 Reset state when bouncing 2022-05-31 21:53:19 -04:00
Sally Coolatta
c3bb2c8539 Add bouncing followers
Set `BobAmp` on a ground follower to set its bouncing velocity.
2022-05-31 07:28:30 -04:00