Commit graph

402 commits

Author SHA1 Message Date
Lach
f274d24560 Fix Poh-Bee behaviour for flipped waypoints 2024-04-09 23:34:18 +10:00
James R
192c770c16 Hold up/down for 2 seconds while not moving to pan the camera vertically 2024-04-02 19:23:53 -07:00
toaster
7f6de407f1 Copyright update: Add Kart Krew (2024) in general for high-traffic inherited sourcefiles 2024-04-02 17:42:38 +01:00
James R
cdc098c22b Battle: Orbinaut/Jawz Shields award points on contact with a player 2024-03-11 05:26:33 -07:00
Sally Coolatta
9b93f56111 Add pre-Podium intermission music 2024-03-10 14:08:59 -04:00
James R
a7979e973e Battle: cap lasers at player's last known floorz
- Do not use camera_t.floorz
- Fixes lasers bobbing up and down sometimes
2024-03-08 17:53:07 -08:00
Eidolon
af7800c17b C++ compat: rename tm -> g_tm
This one's not even C++. It's in the ISO C standard library. :(
2024-02-19 19:36:42 -06:00
toaster
106553f89d Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into srb2-tidy
# Conflicts:
#	src/p_mobj.c
2024-01-27 17:04:00 +00:00
James R
235d107f50 P_AddPlayerScore: negative values remove points 2024-01-26 14:30:55 -08:00
toaster
325079a39a Delete everything major flagged up by listunusedsprites
Notable deletions:
- Metal Sonic Race
    - Includes all the specialised recording/playback apparatus which made g_demo.c harder to read
- A bunch of hyperspecialised code inside several A_ actions
- EXCEPTION: intentfully left in the spriteless SMK stuff for Sal's add-on down the line.
2024-01-11 01:21:43 +00:00
Sally Coolatta
abde576c58 Enforce const in bot ticcmds
There were a few remaining cases of bot ticcmd generation editing player structures directly. Fix all of this and make as much of it pass const player pointers so this physically can't be allowed to happen ever again. Appears to improve bot sync in netgames & demos bot support, but I have not tested extensively.
2023-12-22 23:28:08 -05:00
James R
764a692a5e P_IsLocalPlayer, P_IsMachineLocalPlayer, P_IsDisplayPlayer: let player pointer be const 2023-11-25 04:51:13 -08:00
toaster
97996d1a22 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into other-progression 2023-11-16 13:46:59 +00:00
James R
61cad641bb Invincible player punts hazardous/solid things, unless MF_ELEMENTAL
If player is in one of these states:

- Invincibility
- Grow (K_IsBigger)
- Flame Shield dash
- Over 200% speed

And the other object:

- Does not have MF_DONTPUNT

Then, touching a solid object:

- Punts the object, unless the object has MF_ELEMENTAL
- Fizzles the object, if the object has MF_ELEMENTAL

Or, when an object damages the player:

- That object is punted, unless it has MF_ELEMENTAL
- The object fizzles, if it has MF_ELEMENTAL

Punting means:

- A copy of the object is made
- Both the player and copy receive 5 tics of hitlag
- The copy is thrust away from the player at a minimum of
  60 FU, or 2x either the player's or object's momentum,
  whichever is ultimately greater
- The copy despawns after 2 seconds
- The copy flickers constantly, while thrust away

Fizzling means:

- The object disappears completely
- A puff of smoke is spawned in place of the object
- No hitlag is applied to the player

Both punting and fizzling:

- Hide the original object (intangible and invisible)
- The original object reppears after 30 seconds
- For 2 seconds before reappearing, the object flickers
  back in, but is still intangible
2023-11-13 22:18:35 -08:00
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
7861d51a7f P_TryMove: sweep collided lines to find nearest normal 2023-11-10 00:03:06 -08:00
Gustaf Alhäll
208601e38d Cache and reuse removed mobjs when spawning mobjs 2023-11-05 15:44:53 -06: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
toaster
acad8754c8 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into break-through-them-all 2023-10-17 23:32:08 +01:00
toaster
01b97cb829 Update UCRP_UFOATTACKMETHOD into UCRP_TARGETATTACKMETHOD
Supports Prison Eggs and Gachabom now as well.
For the original behaviour, combine with the new UCRP_SMASHUFO.
2023-10-17 21:03:20 +01:00
toaster
d11fe78e90 UCRP_UFOATTACKMETHOD
`Condition1 = UfoAttackMethod [type]`
    - "smash a UFO Catcher using only [type]"
        - Combine with `Prefix_SealedStar` or `Prefix_IsMap [special stage stage]`
        - Shows up as "???"
    - Types supported:
        - `Boost` - "boost power" (sneakers)
        - `Whip` - "Insta-Whip"
        - `Banana` - "Bananas"
        - `Orbinaut`- "Orbinauts"
        - `Jawz` - "Jawz"
        - `SPB` - "Self Propelled Bombs"
    - Other types could be added on request, these were just the easy ones

In addition, the prototype for P_MobjWasRemoved was moved to `p_mobj.h`.
It's EXTREMELY important that we're able to safely check mobj pointers anywhere a mobj_t is possible to observe, without including the full `p_local.h`...
2023-10-17 01:07:03 +01:00
toaster
d4e3d8433d UCRP_TRACKHAZARD
A series of 100 booleans on the roundconditions struct, one per possible lap.
Allows for a full suite of track hazard touching conditions - see the following examples.

- `Condition1 = Prefix_IsMap RR_MOTOBUGMOTORWAY
- `Condition1 = TrackHazard No`
- `Condition1 = IsMap RR_MOTOBUGMOTORWAY`
    - "MOTOBUG MOTORWAY: Don't touch any track hazard"
- `Condition1 = Prefix_GrandPrix`
- `Condition1 = IsMap RR_HARDBOILEDSTADIUM`
- `Condition1 = TrackHazard Yes`
- `Condition1 = And`
- `Condition1 = FinishPlace 1`
    - "GRAND PRIX: On HARD-BOILED STADIUM, touch a track hazard every lap & finish in 1st"
- `Condition1 = Prefix IsMap RR_DEATHEGG`
- `Condition1 = Trackhazard No 8`
    - "DEATH EGG ZONE: Don't touch any track hazard on lap 8"
- `Condition1 = Prefix_IsMap RR_SPEEDHIGHWAY
- `Condition1 = TrackHazard No Final`
    - "SPEED HIGHWAY: Don't touch any track hazard on the final lap"
2023-10-16 17:09:12 +01:00
James R
fa89576f34 Move freecam state to camera_t, lets splitscreen players use freecam independently of each other 2023-10-08 14:26:21 -07: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
f195b9742a Merge branch 'hardcode-chaos-chute' into 'master'
Hardcode Chaos Chute objects

See merge request KartKrew/Kart!1526
2023-10-04 03:50:56 +00:00
Lach
2bdc055139 Scale Chaos Chute objects 2023-09-29 20:27:13 +10: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
Oni
35c388c877 Merge branch 'item-pickup-restrictions' into 'master'
Anti item farming

See merge request KartKrew/Kart!1492
2023-09-17 04:55:54 +00:00
James R
11fee625f5 P_MobjFlip, P_MobjWasRemoved: let mobj be const 2023-09-16 21:45:59 +01:00
AJ Martinez
562da2b376 Anti item farming: item box clarity 2023-09-12 16:26:40 -07:00
AJ Martinez
34061869c7 Anti item farming 2023-09-11 23:51:13 -07: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
James R
eabef184f1 Add P_ResetPitchRoll 2023-08-27 04:17:16 -07:00
toaster
f7635c4399 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into spraycans 2023-08-22 19:57:28 +01:00
toaster
dc695e7acf First pass at implementing Spray Can pickups
- Replaces a few D00DKart objects because the doomednum specifically replaced one of these
- Reports on load if the map has too many, or if one's assigned but the object doesn't exist
2023-08-19 22:21:20 +01: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
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
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
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
a812ef8809 DMG_WHUMBLE
There are two differences between Whumble and Stumble.
- Stumble cannot be combo'd on upwards momentum, while whumble can. (Resolves #522)
- Whumble takes bumpers, while stumble does not.
    - Removes the MT_INSTAWHIP hack.
2023-07-18 17:39:17 +01:00
Sal
7b98752b67 Merge branch 'refactor-mapthing' into 'master'
Read-only mapthing_t

See merge request KartKrew/Kart!1252
2023-06-14 00:07:42 +00:00
AJ Martinez
2dcfd9542f Instawhip polish round bleven 2023-06-11 20:29:43 -07:00
Sally Coolatta
9d80323a3a Read-only mapthing_t
Map things are writeable in Lua, which I am pretty certain is a mistake because mapthings are not sent over the network at all. I considered making them net-synced (it would be relatively easy), but it also aligns with another, more "philosophical" issue: Doom generally copies over properties from mapthing_t into mobj_t, and then only refers to it again when needing to respawn an object -- mapthing_t is not really intended to be referred to very often at runtime. At best it's slightly annoying since some objects rely on a spawnpoint for behavior changes, at worst it may make ACS more confusing in the future since Thing and Mobj tags are mixed together or less useful since they wouldn't be able to modify behaviors of objects that are based on args.

So I decided to solve these two issues at the same time; just treat mapthing_t as something to copy values from, like OG Doom does it. This basically just means that special and args are also part of the mobj now instead of the mapthing, which should fill any desire to edit this stuff from Lua, and reduces the number of instances where objects need to check for their spawnpoint to function properly.
2023-05-25 14:40:55 -04:00