Commit graph

2463 commits

Author SHA1 Message Date
Sally Coolatta
643cf46b61 Ball switch 2023-09-26 08:37:10 -04:00
toaster
6ec7456cd2 VC requests for L Sign
- Permit KARTSPEED_NORMAL, so it's not TOO obnoxious
- However, check for whether you're fighting a sufficient opponent
    - A human player is considered sufficient, because if you've dominated another it's fun to style on them
    - If all other players are bots, make sure they're at least half the difficulty range
2023-09-19 23:38:48 +01:00
toaster
9574d7a040 Further revision
- Only show SPR2_SIGL for SF_IRONMAN. You've gotta work for that stuff!
- Instead of duplicating some of the behaviour the tally code does manually, simply use tally state directly
2023-09-19 22:40:13 +01:00
toaster
e438ef0a97 SPR2_SIGL
If you achieve a perfect race (OK hand for every lap) on Hard speed (or better), use a special taunting signpost frame.
2023-09-19 22:40:12 +01:00
toaster
5b7b57e580 MT_SIGN: Improve player property grabbing
Instead of using the skin of the object and the color of the player, use a direct player reference to get both skin and color from.
Now correctly tracks Heavy Magicians at all times, not just after exiting.
2023-09-19 22:40:12 +01:00
James R.
37ce3dba27 E-Brake ring: visual consistency and polish
- Always spawns on the ground below the player
- If falling fast enough, spawn afterimages around the
  player like "falling through hoops"
- Also fix scaling to Shrink/Grow
2023-09-18 11:42:52 -07:00
James R.
0a6fedc48a Hyudoro: carry item capsule back to player, use MT_EMERALD for collect animation
- Carry back item capsule, painted with the skincolor of
  the player who was stolen from
- Give player item by orbiting and shrinking into the
  player like an emerald
  - Lock player item box while animation plays, draw an
    empty item box on the HUD
  - At end of animation, burst item capsule to place item
    in player's hotbar
- Hyudoros can no longer stack items in the hotbar --
  consistent with item capsules
  - (If you have a Super Ring in your hotbar and Hyudoro
    is holding a Super Ring too, it will wait for you to
    use yours)

---

MT_ITEMCAPSULE changes:

- extravalue2 != 0: use this color on caps
- MF2_STRONGBOX: award items like the roulette
  - Super Ring is placed in the hotbar instead of awarding
    rings directly
  - SPB is placed in the hotbar instead of throwing it
    immediately
- DMG_INSTAKILL: don't respawn
2023-09-17 21:56:19 -07:00
James R.
c12a80ef91 MT_ITEMCAPSULE_PART: offset parts by MT_ITEMCAPSULE sprx/y/zoff 2023-09-17 21:56:18 -07:00
James R.
00ea7c62df MT_ITEMCAPSULE: optionally teleport to target, offset by target sprx/y/zoff 2023-09-17 21:56:17 -07:00
James R.
fac5abf69e MT_SHADOW: move code to objects/shadow.cpp; copy whiteshadow from followed object 2023-09-17 21:56:17 -07:00
James R.
72ef1d352b mobj_t: add shadowcolor member to change shadow palette index 2023-09-17 21:56:17 -07:00
toaster
9ba5a93407 Merge branch 'spraycans-2' into 'master'
Tutorial Spray Cans

Closes #669

See merge request KartKrew/Kart!1498
2023-09-17 13:17:41 +00:00
Oni
6ccaae4a0c Merge branch 'fix-inside-top-bug' into 'master'
Fix THAT ONE Garden Top bug, which is also a bug with Rocket Sneakers

Closes #610

See merge request KartKrew/Kart!1499
2023-09-17 05:22:48 +00:00
Oni
a0a1ef41e2 Merge branch 'fix-sealed-star-emerald-die' into 'master'
Fix UFO Catcher Emerald dying on death pits -- also a general fix to death pits

Closes #608

See merge request KartKrew/Kart!1497
2023-09-17 05:22:21 +00:00
toaster
467b5f831b Add GTR_CHECKPOINTS
- Prevents Checkpoint from spawning
- Prevents spawnpoint-handling code from occouring
2023-09-16 23:22:59 +01: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
James R
11fee625f5 P_MobjFlip, P_MobjWasRemoved: let mobj be const 2023-09-16 21:45:59 +01:00
toaster
e1a4f615b9 P_CheckDeathPitCollide: Use P_GetSpecialBottomZ/P_GetSpecialTopZ instead of floorz, ceilingz
Fixes a nasty ledge/FOF touch oversight
2023-09-16 21:05:14 +01:00
James R.
2fd9976102 MT_EMERALD: do not check death pit if MF_NOCLIPHEIGHT 2023-09-16 21:05:13 +01:00
James R.
0bfee3176f P_CheckDeathPitCollide: handle slopes 2023-09-16 21:05:13 +01:00
James R.
a392996a54 P_RemoveMobj: only repair hnext linked list is object is a part of the list
This indirectly fixes a bug with Rocket Sneakers:

- Give yourself Rocket Sneakers, use them up completely.
- Instantly give yourself and deploy Orbinauts (may want
  to use a bind for this, since it has to be quick).
- Wait a moment for the exploded Rocket Sneakers to fall
  to the ground. When this happens, the Orbinauts will
  stop following the player -- they will enter a buggy
  state.

So many items uses hnext/hprev, that I decided to make
a general fix that probably covers most bugs that could
arise from poor handling of hnext/hprev.
2023-09-14 04:03:50 -07:00
toaster
753b733f7e Permit multiple Spray Cans in one map
- Up to 255
- Each Spray Can placed does, in order, the postion in the list from the current head
    - So if there were 3 cans, and your can list was Red Yellow Blue Green, then Red, Yellow, and Blue would be in the level.
- Grabbing the nth colour in the list will swap that colour to the current head of the list
- However, the game will print to the console if you do this outside of GS_TUTORIAL.
2023-09-13 18:02:43 +01:00
AJ Martinez
18bc0d22e5 Higher fastfall gravity with bubble 2023-09-10 18:08:25 -07:00
James R.
9a409c5e93 P_DefaultMobjShadowScale: add shadow for Spraycans 2023-09-08 02:55:48 -07:00
James R.
c454843837 Spraycan HUD tracking 2023-09-08 02:55:48 -07:00
toaster
898a659c78 Merge branch 'initplayers-reorder' into 'master'
Fix Splitscreen GP Prison Break

See merge request KartKrew/Kart!1446
2023-09-01 20:43:10 +00: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
toaster
f9a488defb Merge branch 'prisons-death-fix' into 'master'
Fix Prisons death not ending the round + Spectator bool cleanup

See merge request KartKrew/Kart!1418
2023-08-31 18:39:05 +00:00
toaster
60ce81f00d Fix the order of operations so K_TimerInit is ready for P_InitPlayers
Guarantees players in splitscreen GP Prison Break rounds are always deterministically placed (as long as the non-battle spawnpoints exist)
2023-08-31 19:24:49 +01:00
toaster
1dd2e7031a Fix the spectating bots in GP issue a different way
The solution in 67c2ae021b happens too late for K_TimeAttackRules
2023-08-31 16:46:46 +01:00
toaster
656e9ad310 Merge branch 'thing-radius-acs' into 'master'
"Radius Action" thing type

See merge request KartKrew/Kart!1429
2023-08-31 13:15:12 +00:00
toaster
43eb61dfcb Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into prisons-death-fix
# Conflicts:
#	src/p_inter.c
2023-08-31 14:02:38 +01:00
James R
b8b286b177 Merge branch 'softer-stumble' into 'master'
Smoothlanding leniency (resolves #602)

Closes #602

See merge request KartKrew/Kart!1428
2023-08-28 07:49:20 +00:00
James R
67c2ae021b P_SpawnPlayer: add back explicit spectator handling for bots; also remove it from k_grandprix.c
Not needed in K_UpdateGrandPrixBots or
K_LoadGrandPrixSaveGame because P_SpawnPlayer takes
priority.
2023-08-27 16:00:53 -07:00
Oni
055e4f1e50 Merge branch 'moar-sneaker-panels' into 'master'
More Sneaker Panels

See merge request KartKrew/Kart!1430
2023-08-27 19:29:11 +00:00
James R
eabef184f1 Add P_ResetPitchRoll 2023-08-27 04:17:16 -07:00
AJ Martinez
03b491a2fa Fix Magician Box going crazy when player changed scale 2023-08-26 23:49:33 -07:00
Lach
ac9b96e98b Add spawn rate arg to Sneaker Panel Spawners; allow sneaker panels to scale themselves redundantly 2023-08-27 14:01:23 +10:00
Sally Coolatta
ea7ad31fef Add Radius Action thing
Thing type 4096, activates its action when a player enters the specified radius
2023-08-26 20:28:50 -04:00
toaster
e123ed7480 MAJOR cleanup of Spectator set/unset
- G_AddPlayer now contains CL_ClearPlayer, G_DestroyParty, and playeringame set
- Instead of a nasty, complicated block in P_SpawnPlayer, externalise it into G_SpectatePlayerOnJoin
- All mid-game human player-to-spectator transitions are handled by P_SetPlayerSpectator, instead of lots of `spectator = true` and associated boilerplate
    - Simplifies Got_Teamchange MASSIVELY
        - Of course this is helped by also stripping back team change
    - This is called by P_KillPlayer, too
- P_KillPlayer no longer eats DMG_SPECTATOR when lightsnaking or exiting
- G_GametypeHasSpectators condition tidied
2023-08-26 19:48:20 +01:00
James R
6c0b042eed Refactor cvar definitions completely, move everything to cvars.cpp
- No need to call CV_RegisterVar
- Cvar definitions live in only one file, easier to locate
- Organized into sections -- netvars, cheats, etc.
- Use builder pattern to initialize cvars
- Still need to extern if you want to read the cvar value
2023-08-25 17:22:40 -07:00
James R
c194ccb81a Remove more unused cvars
- respawnitem
- respawnitemtime
- respawndelay
- startinglives
2023-08-25 17:18:21 -07:00
Sally Coolatta
3c8eb505cc Merge branch 'master' into thing-script-args 2023-08-25 18:32:55 -04:00
toaster
a3640110ae Only permit Spray Cans to be grabbed on base game levels
I would not be so heavy handed against preventing players from grabbing Spray Cans on custom levels, but designing a system that permits unloaded headers to retain their cans is frankly overkill. There are plenty of other ways the same kind of level-scouring play can be experienced on custom levels.
2023-08-23 17:16:07 +01:00
toaster
e1b7cb66cb Rework the Spray Can system to ACTUALLY be what we want
Instead of being specific to each level, Spray Cans are stored in a list on gamedata that will be stepped along each Spray Can you collect.
They are only assigned to a level on collection - which prevents you from farming the same easy location for every colour in the game.

In addition, this new system is one step short of dehardcoding them entirely. Now only Spray Cans specifically asked for by the existence of UC_SPRAYCAN will be put in the list, and if a secondary parameter is either "Yes" or "True", it will be put at the head of the list. This could technically support custom skincolours one day, but the author of this commit doesn't care to do the last bit of work necessary to make it happen.

There's a slight extra overhead in that skincolor_t now also holds a `cache_spraycan` (renamed from `cachedcan`, which maps had previously)

Currently, there's no safeguard against grabbing it on a custom course - you'll lose the Spray Can as soon as you load a fresh game again - but  I consider that easy to fix (tomorrow) and necessary before merger, because the author of this commit does NOT want complaints on release because we forgot to protect users who keep on losing their skincolors.
2023-08-23 00:46:46 +01:00
toaster
3ccf668fda Rename numspraycans to nummapspraycans
- Consistency with nummaprings
- Prevents confusion with incoming gamedata struct variable
2023-08-22 23:12:02 +01:00
toaster
f7635c4399 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into spraycans 2023-08-22 19:57:28 +01:00
Sally Coolatta
f02e6dbe3c Final thing args code cleanup
- Fix the last few bugs I could find with thing args
- Move version update code
- Rename internal variables to `thing_[string]args` to make older code merge issues more obvious
2023-08-22 02:14:09 -04:00
Sal
eb72019426 Make UDMF scale compatible with ZDoom's spec 2023-08-21 03:33:05 -04:00
Sally Coolatta
9d940ed654 Separate script args from mapthing args
SRB2 uses a LOT of mapthing args compared to Hexen (which has none) and ZDoom (which only has them on objects that will never ever activate scripts). So we really badly needed to separate the two if we want attaching scripts to things to be useful.
2023-08-21 03:33:04 -04:00