Commit graph

674 commits

Author SHA1 Message Date
toaster
4d55a2ebe3 P_NetUnArchiveThinkers: set thinker references to 0 before removing
Fixes failed assertion on server join (resolves #514)
2024-10-18 04:09:20 -04:00
NepDisk
037a26b3e2 Implement tiregrease for loops and apply outruntime 2024-10-17 17:08:45 -04:00
James R
da96a75b64 Loops: correct origin point over duration of loop
- Players moving into a gate with a lot of momentum would
  offset the origin point from its intended position
- Find intersection of player movement and gate
- Correct origin point between loop entry and exit by
  interpolating the difference between player position on
  entry and intersection point
2024-10-16 22:30:45 -04:00
Sally Coolatta
34c4a207c7 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.
2024-10-16 13:19:31 -04:00
NepDisk
b5c21c8d88 Read-only mapthing_t 2024-10-16 13:11:13 -04:00
NepDisk
af277ad1d9 Split G_ExitLevel into G_BeginLevelExit and G_FinishExitLevel 2024-10-15 16:19:50 -04:00
Sally Coolatta
1f6574e9a3 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.
2024-10-15 15:13:50 -04:00
Sally Coolatta
9ce121233e Add save/load stream for ACS
Saves the majority of the VM state, but not the SRB2-specific vars ... that can come after food
2024-10-15 07:51:13 -04:00
James R
3fb806ed71 Remove global lua_save_p and use savebuffer_t for LUA_Archive / LUA_UnArchive 2024-10-15 07:43:52 -04:00
Sally Coolatta
07cdd2f461 Make save_p / savebuffers not global
This caused some scary issues with P_SaveNetGame the other day, and it's making ACS net sync harder. Let's just cut this off right now.

Also fixed some scary mix-ups in some of the Lua archiving code.
2024-10-15 06:41:25 -04:00
James R
9e801c66d5 Merge branch 'universal-typedef' into 'master'
Move all typedef into one file

See merge request KartKrew/Kart!791
2024-10-15 04:16:58 -04:00
NepDisk
7cfa6fa129 Implement lapvalidation
this uses a seperate bool inside the player to check if incrementing the lap when crossing the line is ok. Shouldn't conflict with the old checkpoint system or on maps with starposts in general
2024-10-09 13:31:37 -04:00
NepDisk
000c5cf15a Lua indecent exposure 2024-10-04 15:58:46 -04:00
NepDisk
7b2ee07993 Remove RR ringsparkle and use regular srb2 ring sparkle 2024-09-20 15:49:44 -04:00
NepDisk
9321aa6229 fix boss3cap sync 2024-09-18 19:38:23 -04:00
James R
dd7e3e4c26 Loop camera
It zooms out, pans to the side and toward the player.

Loop Center thing:

- arg2: zoom-out speed in tics (zooms out when entering the loop)
- arg3: zoom-in speed in tics (zooms in when exiting the loop)
- arg4: zoom-out distance in fracunits (multiply by 65536)
- arg5: angle to pan to the side of the loop in degrees fracunits (multiply by 65536)
  - This will be flipped depending on where the camera was
    facing before entering the loop.
- arg6: panning speed in degrees fracunits (multiply by 65536)
- arg7: panning acceleration in tics (camera gradually pans to side of loop)
- arg8: panning deceleration in tics (camera gradually pans back to normal)
2024-09-12 13:04:37 -04:00
Oni
4c994de722 Merge branch 'loops' into 'master'
Sonic Loops

See merge request KartKrew/Kart!991
2024-09-12 12:10:40 -04:00
NepDisk
5733b3b14b resync sourceline 2024-09-12 00:29:35 -04:00
NepDisk
6df955cdc3 Revert Track skybox within player struct
This was done to make lua scripts that change the skybox work again!

This reverts commit 196dc77e6faafe41203ef132580c3178ad4562de.
2024-09-10 14:43:00 -04:00
Oni
8012a21070 Merge branch 'alt-music' into 'master'
Alt Music

See merge request KartKrew/Kart!915
2024-09-07 13:57:13 -04:00
NepDisk
443737fc9d Implement Outrun terrain type with a twist!
Since I want to keep the v1 style speed cap, I am going to use a timer set alongside the outrun to enable/disable the ground speed cap so the speed boost doesn\'t get neuterd hard
2024-09-06 17:08:19 -04:00
NepDisk
f1a63eaf8c remove unused spring star code 2024-09-06 02:42:20 -04:00
James R
ed8b681949 Add lightlevel field to mobj_t
Adds r_spritefx.cpp

lightlevel should be -255 to 255, relative offset to
normal sector lightlevel.

If RF_ABSOLUTELIGHTLEVEL, mobj_t.lightlevel becomes an
absolute lightlevel in the range 0 to 255.
2024-09-05 21:39:06 -04:00
NepDisk
878391906f Allow waypoints and boss3 to work t the same time 2024-09-04 12:51:21 -04:00
AJ Martinez
87d5eb6267 Briefly lock out TRIPWIRE_BLASTER after failing a tripwire 2024-09-03 23:09:41 -04:00
Sally Coolatta
dec51a3b25 Add sector action
Linedef actions, but on sectors. Including args, stringargs, and unique activator flags.
2024-09-03 16:53:54 -04:00
NepDisk
3aab5834fc d5155e3d83411be7e71953e2f8e8fdc52818b36d 2024-09-03 16:39:02 -04:00
Sally Coolatta
106fc14e25 Split EV_DoFloor, EV_DoCeiling, and EV_DoCrush
And remove their dependency on a line_t existing.

One step towards implementing linedef executor functions into ACS.
2024-09-03 15:13:34 -04:00
NepDisk
8de69a20c7 distancetofinishprev related stuff 2024-09-02 07:42:33 -04:00
toaster
6d799bab67 Consistency for mobjnum 0 meaning NULL
Moves `P_Net(Un)ArchiveTubeWaypoints` down the file to take advantage of `SaveMobjnum` inline.
2024-09-02 06:00:04 -04:00
toaster
3422236b8e Cleaner reference handling for the following extern-scope netsynced mobj_t*.
- `skyboxcenterpnts` and `skyboxviewpnts`
    - P_InitSkyboxPoint`, which calls `P_SetTarget`
- `waypoint->mobj`
    - Make sure NULL before using `P_SetTarget` on
- `tubewaypoints`
    - Use `P_SetTarget`
    - Use `UINT32_MAX` for the invalid mobjnum, since 0 is a valid one.
- `waypointcap` and `kitemcap`
    - NULL before reset

Our international nightmare is over.
2024-09-02 05:52:27 -04:00
NepDisk
be5d651d1e Don't tie restoring mobj/waypoint pointers on player struct to existence of player object
b573b6efbc
2024-09-02 05:45:06 -04:00
Sally Coolatta
d3d3e1991e Fix missing currentwaypoint in saveg 2024-09-02 05:34:53 -04:00
Sally Coolatta
3c274581c7 Add currentwaypoint 2024-09-02 05:34:29 -04:00
Sally Coolatta
25a9b5cfa9 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.
2024-08-22 18:00:14 -04:00
James R
711df9fb03 Merge branch 'fix-terrain-saveg' into 'master'
Save terrainOverlay in gamestate

See merge request KartKrew/Kart!735
2024-08-21 22:45:44 -04:00
NepDisk
ccfa90677c Merge branch 'v2dev3' into udmf-cherrypick-cherrypick 2024-08-21 22:13:53 -04:00
Oni
78f7cadd9b Merge branch 'cull-debugwaypoints' into 'master'
debugwaypoints: cull debug mobjs outside of drawdist

See merge request KartKrew/Kart!1201
2024-08-21 15:52:31 -04:00
NepDisk
a2fcc4bc20 UDMF cherry-pick cherry-pick 2024-08-20 02:47:00 -04:00
NepDisk
ac27f0438a Port antigrief from SRB2Kart
Ported this one spefically since I prefer how it works
2024-08-18 01:39:26 -04:00
NepDisk
8df6c9e4ef Add starpost stuff to nextsync and remove unsued hyudoro thing 2024-08-15 20:12:53 -04:00
NepDisk
bfd608efc8 Fix net archiving 2024-08-15 20:10:02 -04:00
NepDisk
9ba2140b3d Restore old respawn PT1
All the code from k_respawn.c has been nuked. The gameplay of respawning works but it doesn't currently drop the player in the right spot for both legacy and new waypoints
2024-08-12 14:49:12 -04:00
NepDisk
fd6ec7746f remove more unused DI code 2024-08-08 19:14:32 -04:00
NepDisk
51178216e2 Remove trick panel leftovers 2024-08-05 12:24:00 -04:00
toaster
9016f65440 Support alternate gameplay events during GP
- Implementation details:
    - grandprixinfo.eventmode is the reference point
    - All bots have spectator applied and removed at map start depending on eventmode, and I've done my best to guard against side effects of not removing them entirely
    - You shouldn't turn off grandprixinfo.gp when turning on things like specialStage.active or bossinfo.boss when pursuing eventmode behaviour
    - Probably needs to be integrated into XD_MAP for any future netplay support, is currently disabled.
    - You technically don't have to assign a Capsules map to be the bonus and a Special Stage to be the special. A Capsules map can be assigned to a Special Stage too, and a Boss can be assigned to either of them.
    - Special Stages are still just as incomplete as they were before.
- Break the Capsules has special behaviour.
   - Timelimit starts at 20 seconds.
   - Earn 10 seconds (plus a little extra cheaty time) every capsule you destroy.
   - WIN + extra life if you bust all the capsules, COOL if you get some but run out of time, LOSE if you lose your bumper or run out of time without breaking a single capsule.
   - Supposed to also give you rings, but ran into a LOT of difficulty with this and didn't want to commit half-baked stuff, so it'll be a later project.
Also:
- Fix a long standing bug where totalring was reset between maps, preventing the sum from adding up across GP rounds and depriving you of extra lives you were owed.
- Fix an issue where Break the Capsules record attack was KARTSPEED_HARD.
- Send timelimitintics in savegames, since it's handled seperately now.
2024-08-05 00:41:06 -04:00
NepDisk
47cda284e6 Remove steering, use v1 turnvalue calcs, remove handleboost 2024-08-04 10:16:51 -04:00
NepDisk
4417a9e5c2 fix Join freeze
whoops
2024-08-01 21:25:46 -04:00
Ashnal
2dcf8c103a Attempt to fix use after free bug
with precipitation mobjs on netgame load
2024-08-01 19:24:10 -04:00
NepDisk
1c16abadf6 implement water panels and add pogo springs to terrain 2024-08-01 17:25:46 -04:00