Commit graph

734 commits

Author SHA1 Message Date
James R
622bfa9512 Count nullHitlag for inflictor player too
Cancel hitlag of inflictor player too if the inflictor is
a constant damage source and the target is invincible.
2023-03-11 05:36:24 -08:00
James R
b2a6ffecf9 Refactor player->invulnhitlag -> player->nullHitlag
- Move condition for whether hitlag came from a constant
  damage source into P_DamageMobj directly. Should be more
  accurate if a player is dealt brand new damage, the
  constant damage still won't count.

- player->invulnhitlag renamed to player->nullHitlag
2023-03-11 05:36:24 -08:00
James R
a3c64068e6 Replace bumpers completely with health
Adds some functions:

- K_Bumpers, bumper count for the count, intended for
  where player->bumpers was used in HUD and visual
  contexts.
- K_BumpersToHealth, converts bumper count to health
  points.

player->mo->health replaces player->bumpers where it was
used in health contexts.

Removes some functions:

- K_HandleBumperChanges
- K_DestroyBumpers

Everything K_HandleBumperChanges did has either been
removed or moved elsewhere. P_KillMobj also already called
K_CheckBumpers.

K_DestroyBumpers became pointless after player->bumpers
was removed.
2023-03-07 22:54:33 -08:00
James R
3843f0c3cd Remove more Karma Bomb crap
- remove Karma Bomb boost trail condition
- remove Karma Bomb condition for Eggman Mark
- remove Karma Bomb condition for hiding player name tags
- remove Karma Bomb player translucency
- remove Karma Bomb respawn invincibility
- remove Karma Bomb speed buff
- remove Karma Bomb sphere digestion
- remove Overtime Karma
2023-03-07 22:32:28 -08:00
toaster
d2c36c952a Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into conditions-cascading
# Conflicts:
#	src/k_grandprix.c
#	src/k_grandprix.h
2023-03-07 19:37:46 +00:00
Oni
e4ba544994 Merge branch 'buff-sliptide' into 'master'
Make sliptiding actually good

See merge request KartKrew/Kart!1020
2023-03-07 08:49:46 +00:00
Oni
cdc56ab2cc Merge branch 'podium' into 'master'
Podium

See merge request KartKrew/Kart!1014
2023-03-07 05:58:20 +00:00
toaster
4802f96249 UCRP_TRIGGER: Convert to roundconditions_t
- Previously was extern scope UINT32 for all players, but this permits one player in a netgame taking a secret path while others don't.
- Attempted to make user-specifiable string, but while I can undo the effects of strtok for the condition, I cannot undo the effects of strupr - so it's disabled for now until we come up with a more robust and hopefully direct system.
- Also removed some old SRB2-originated assumptions that you couldn't unlock anything in multiplayer from the unlocktrigger system.
2023-03-07 00:03:41 +00:00
Sally Coolatta
55de982fa3 GP ranking
Needs balancing + intermission, but mostly functional
2023-03-06 18:25:14 -05:00
toaster
98423a2196 UNSTAGED CHANGE: Missing mobjeflag_t wet_player from roundconditions_t 2023-03-06 22:57:53 +00:00
toaster
baeb48ca1f roundconditions_t - State tracking for events which occour mid-match and don't stay that way
- Exists on every player struct to simplify writes, but A) not netsynced and B) only checked for local players
- Updated in the relevant locations - no centralised ticking at the moment
- Has a number of new associated conditions that require playing (UCRP's).
    - The following require [True/False] as supplementary information.
        - FallOff
        - TouchOffroad
        - TouchSneakerPanel
        - RingDebt
    - The following have no supplementary information because they're universally a specific achievement.
        - TripwireHyuu
        - SPBNeuter
        - LandmineDunk
        - HitMidair
    - The following has specific requirements that can be set.
        - WetPlayer [name of fluid]
             - Append "Strict" to forbid even skimming the surface of the map's fluid.
2023-03-06 22:31:35 +00:00
AJ Martinez
f4fbd1e654 Sliptide boost VFX first pass 2023-03-06 05:00:59 -07:00
AJ Martinez
87d8945f97 Make sliptiding actually good (no visuals)
50% increased effect of handling boosts, 75% reduced penalty for handling boost stacking, grants a boost proportional to your sliptide length when you straighten out
2023-03-05 23:57:47 -07:00
Sally Coolatta
82313de499 Awayview cleanup
- Moved variables to awayview_t
- Arbritrary +20 is no longer added to z pos, it will use the thing position as the camera position directly.
2023-03-03 16:09:54 -05:00
AJ Martinez
79d8e4e109 WIP: SPB Attack - temp menu draws OOB, no unlocks 2023-03-03 12:14:58 -08:00
James R
e5a533544d Add sonicloopvars_t to player_t 2023-02-28 19:14:35 -08:00
AJ Martinez
9b5bd70cae Briefly lock out TRIPWIRE_BLASTER after failing a tripwire 2023-02-24 00:30:21 -07:00
AJ Martinez
00aa69ca0a Buff eggbox speed, allow contact transfers 2023-02-21 23:00:56 -07:00
AJ Martinez
32ea795639 Fault rework cleanup for merge 2023-02-13 15:31:39 -07:00
AJ Martinez
de268b744b Beam fault cleanup, make non-circuit death faults respawn at wp behind finish 2023-02-11 19:09:52 -07:00
AJ Martinez
dfdfef3355 Fix missing timer definition, unset player speed when unfaulting 2023-02-03 02:34:36 -07:00
AJ Martinez
30457f6b79 Briefly remove players from reality on early POSITION beam cross 2023-02-03 01:39:18 -07:00
toaster
1213836564 Permit a lightsnaking player to go into RESPAWNST_DROP (the final second of lightsnake) early at any time after the initail bring-back-to-last-waypoint.
Needs balance testing, but resolves #299.
2023-01-06 13:20:04 +00:00
Eidolon
be021baa02 Add extern "C" in C++ to all headers 2022-12-30 19:26:16 -06:00
James R
b73bbd3712 Add invulnhitlag, timeshit and timeshitprev fields to player_t 2022-12-21 08:08:59 -08:00
toaster
33167078c8 Merge branch 'capsules-improvement' into 'master'
Break the Capsules additions

See merge request KartKrew/Kart!793
2022-12-20 21:26:46 +00:00
Sally Coolatta
a7ff0afc8b Merge branch 'master' into capsules-improvement 2022-12-19 01:12:07 -05:00
VelocitOni
8cd36dbf03 Merge branch 'master' into unlockables-undefeatable 2022-12-18 01:59:04 -05:00
Sally Coolatta
f7e53ec811 Cleanup lots of the older roulette code
- Most of it now requires a reference to itemroulette_t, rather than copying all of the variables over.
- Increased the effect of Frantic Items, as the old scaling was made extremely low because  item distance was exponential back then.
- A lot of variables are pre-calculated in itemroulette_t instead of redoing the calculations every time (player count, first place's dist, etc)
- Make most of these functions only accessible by k_roulette.c
- Even when single items get forced into your roulette, the Super Ring Debt effect can happen
- Make the game support setting single items from other gametypes (Pogo Spring-only races work now)
- Fix some item distances not accounting for scale
- Prevent multiple of certain items from rolling at once; Shrinks (not a big deal) and SPBs (OH GOD NO)
2022-12-15 01:23:23 -05:00
VelocitOni
c5372f4ce3 Merge branch 'master' into capsules-improvement 2022-12-14 23:19:34 -05:00
Sally Coolatta
2a546df3fb Fix debugger breaking, reduce size 2022-12-13 12:44:11 -05:00
Sally Coolatta
c184567361 No longer dynamically allocate roulette list
Done with the issues trying to sync this memory over the wire, so now it's just a long static array...
2022-12-13 12:06:52 -05:00
Sally Coolatta
b0537de79e Re-implement debugitemodds 2022-12-12 16:44:24 -05:00
Sally Coolatta
202c505664 Implement roulette visuals 2022-12-12 02:18:18 -05:00
Sally Coolatta
534026764c Make Eggman Mark actually work 2022-12-12 00:22:14 -05:00
Sally Coolatta
a481e4b34b Deterministic roulette
The roulette contains NO (non-seeded) RNG anymore. You manually stop it at any time.

Still needs the visual of the items scrolling, to make it not blind.
2022-12-11 23:58:11 -05: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
Sally Coolatta
81cefa2697 Gachabom initial pass
They simply use Kitchen Sink's item icon and Orbinaut's sprites.

The forward toss behavior needs fine-tuning to use more MT_BANANA style behavior.
2022-11-28 02:41:42 -05: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
toaster
6d0637d39d Unlockable skins (in a way friendly to #define MAXSKINS 255)
Mammoth commit, sorry. I only realised halfway through writing it that SECRET_SKIN was only partially merged.

Ports from 2.2:
- Merge SECRET_SKIN (STJr/SRB2!1474)
    - Default skin is now handled by checking all skins for unlock status, and I_Erroring if none are available
    - Don't show skin names on game startup, to keep our secrets hidden
    - Unlockables now have string variables zallocated.
         - For skin names rather than numbers.
    - Correctly clean up memory when freeing unlockables and emblems.

Bespoke code:
- For temporary testing. `unlocks.pk3`
    - Using this for rapid testing gameboot SOC instead of patch.pk3 because of the intent to turn that into scripts.pk3
- Don't not save gamedata in DEVELOP builds, even if you've used cheats!
- `player->availabilities` is now an array of UINT8
    - (MAXSKINS + 7)/8 entries, or 32 bytes.
    - Included with XD_ADDPLAYER instead of XD_NAMEANDCOLOR.
         - Simplifies a lot of logic with respect to demos, skin changes mid-game, etc.
             - Seriously, there's a lot of random places in the code that just iterate over MAXSPLITSCREENPLAYERS and g_localplayers to update availabilities in real time in a way that's not particularly netsafe...
         - Lines up with the plan for handling unlocks when returning to menus.
         - Was included with XD_ADDBOT, but that actually overruns the netxcmd buffer at first mapload with 7 bots. We might need to consider expanding the size of the netxcmd buffer...
    - In demos, can be interpreted as both relative to the original replay and the current skin list depending on boolean context provided to R_SkinUsable.
    - Used for SF_IRONMAN (and will crash if all other skins are inaccessible).
- Grand Prix bot randomisation uses the host's unlocks.
- Don't show locked characters on the fancy new character select.
-  DXD_JOINDATA for demos
    - Replaces the dual-purpose behaviour of DXD_PLAYSTATE
    - Contains availabilities
    - Handles bot material in a different way
- Forceskin restrictions
    - Won't run in demos, because it's assumed recorded DXD_SKIN will handle all the conversions the original match had
    - Won't run if K_CanChangeRules says no
- Correctly set `mapvisited` on level visit, even in [fake gasp] MULTIPLAYER/NETGAMES!! 🥹
- Added updating unlockables and extra emblems on `mapvisited` update.
    - Currently fails to produce the cecho, but that'll be stripped out entirely in a future commit so I'm not bothered.
2022-11-27 22:53:29 +00:00
Oni
db621c4538 Merge branch 'waypoint-fixes' into 'master'
Big Waypoint Change

See merge request KartKrew/Kart!784
2022-11-27 02:01:43 +00:00
Sally Coolatta
b55c67c29d Add currentwaypoint 2022-11-26 02:46:52 -05:00
toaster
b8f59fd227 Skin and playerstate code in demos has been partly rewritten to support more than was previously possible.
Notable new features:
- Guaranteed native compatibility with SF_IRONMAN even with differing # of skins
- Bots (todo: can still desync midway through round)

Implementation details:
- Demo code (skins):
    - Instead of writing a skin name string, and the player's kartspeed, kartweight, and charflags for each player in the initial player-interpreting loop...
    - Write a skinlist of EVERY skin's name string, kartspeed, kartweight, and flags next to the file list, to be read into `demo.skinlist`.
        - If the skin name isn't loaded, find the skin with (in order)
            - SF_IRONMAN if your skin had SF_IRONMAN, since that's more important to signal
            - the closest stats otherwise (as per previous implementation)
        - Just as tolerant to stats AND the number of base skins changing between versions (the bonuschars aegis situation)
        - Not tolerant to restat, but we can add a DXD or EZT later if we want to natively support that kind of mod
    - In the initial loop and DXD_SKIN, just write an index that can be used for `demo.skinlist`, and store it in `demo.currentskinid[p]`
    - The player's skin is now encoded as EZT_IRONMAN for ghosts (and just in case RNG sync fails for unrelated reasons)
- In the SF_IRONMAN code when demo.playback is true
    - everywhere where `skins[player->skin]` is referenced instead uses an index into `demo.skinlist`
    - SetRandomFakePlayerSkin uses the `demo.skinlist` to build a table to ensure exact random call parity
        - Also means it no longer double rejection-samples.
    - `player->fakeskin` and `lastfakeskin` are always == their original recording values, a skin id which can be used into `demo.skinlist`
- Demo code (playstate, initial player setup loop):
    - Add bot flag (`DXD_PST_ISBOT`, `DEMO_BOT`)
    - Add in-between-level botvars (difficulty, diffincrease, rival)
    - Don't rely on `PF_WANTSTOJOIN` to activate

Additional bugfixes:
- Followerskin set to -1 in CL_ClearPlayer so a bad follower isn't recorded on player join without name and color change arriving immediately
- Accomodate new joiners in demo code even if they're not on DXD_PST_SPECTATING for one reason or another
- Demo extra file list saving is now its own function for code cleanliness
- Actually only modify players relevant to the demo at the end of G_DoPlayDemo, not all 16 by supplying and overwriting garbage values (POSSIBLE MEMORY CORRUPTION FIX, mobj_t pointer was previously dereferenced)
2022-11-22 14:28:48 +00:00
toaster
e65d17cd4d Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into ironman
# Conflicts:
#	src/g_demo.c
2022-11-21 15:49:29 +00:00
Oni
996e3c97ef Merge branch 'banana-vfx' into 'master'
Banana visuals

Closes #308

See merge request KartKrew/Kart!772
2022-11-19 00:47:21 +00:00
Sally Coolatta
d0cd25328e Remove decabanana 2022-11-18 02:34:59 -05:00
Sally Coolatta
0233c26386 Chengi's new position numbers 2022-11-17 21:11:01 -05:00
AJ Martinez
80252717c9 Kill SF_HIRES, use skin_t highresscale instead 2022-11-03 16:19:17 -07:00
AJ Martinez
86366b000c HOSTCODE 'ironman' - WIP 2022-11-03 03:38:54 -07:00