Commit graph

1105 commits

Author SHA1 Message Date
Sally Coolatta
5b147f59ed Add sector action
Linedef actions, but on sectors. Including args, stringargs, and unique activator flags.
2023-01-06 05:31:53 -05:00
Sally Coolatta
75658fd469 Implement thing special
Executes when an object is killed.
2023-01-05 23:58:48 -05:00
Sally Coolatta
1caf255f5c Merge branch 'master' into acs 2023-01-05 22:23:51 -05:00
toaster
42a6b03e48 Remove "circuitmap"
An effectively useless global scope boolean that literally checks for the presence of a finish line, created in and used only by things we inherited from vanilla SRB2
2022-12-31 23:27:59 +00:00
toaster
6b18f869b9 Prevent a special stage win by sneaking ahead of the UFO to the goal line 2022-12-31 19:02:22 +00:00
Sally Coolatta
d5155e3d83 Add Hexen line activation flags
- Lines can be set to activate when crossing or bumping into them, with distinctions for players, enemies, and missiles+items.
- A new flag has been added to determine if a line special can activate more than once.
- Finish Line + Respawn Line are now handled like other specials. This means that:
    - They follow the new line activation rules (so you can potentially have a finish line that you have to bump instead of cross)
    - More importantly, they can be called as functions in ACS. (Player_FinishLine and Player_Respawn)
- Fixed linedef flags not being saved in save games.
2022-12-31 13:41:17 -05:00
Sally Coolatta
8f87c3761b Finish Script Editor tooltips 2022-12-28 16:58:16 -05:00
Sally Coolatta
7a0faf71ab Fix ACS specials not working in binary maps
Didn't copy over the text field.
2022-12-28 08:50:51 -05:00
Sally Coolatta
4ffa63a9c8 Improve compiling, add ACS_Execute
Arbritrary ACS scripts can now be run from linedef executors. I will be implementing more, non-linedef-executor-related methods in the future.
2022-12-27 17:04:06 -05:00
toaster
03c8fd543f More fun rules for Special Stages
- GTR_ROLLINGSTART
    * Initial instathrust, as before
    * Forced MAXPLMOVE forward
    * Disable finish line beam
    * "Super transformation" sound
        - Reference to the previous entry in the series' Perfect Startboost mechanic
- GTR_SPECIALSTART
    * Instant white fade
    * No titlecard (overridden by Boss intro)
    * Starting warp sound
- Match slidein time with no traditional titlecard to the end of the playsim intro fade
- Remove G_IsSpecialStage
2022-12-27 17:58:35 +00:00
Sally Coolatta
3135d14387 Replace LinedefExecute hook
- It is now called the "SpecialExecute" hook, since it can be called from ACS in addition to linedef specials.
- The input arguments are completely different now. Instead of (line_t, mobj_t, sector_t), it's (activator_t, args array, stringargs array). activator_t is userdata containing valid, mo (mobj_t), line (line_t), side (side_t), sector (sector_t), and po (polyobject_t).
2022-12-27 09:24:59 -05:00
Sally Coolatta
16a7f1dd63 Update executor 428 for ACS 2022-12-27 08:34:06 -05:00
Sally Coolatta
e8dff8f12a Update executor 435 for ACS 2022-12-27 07:43:38 -05:00
Sally Coolatta
7d177a9157 Update executors 400, 403, 405, and 429 for ACS 2022-12-27 07:43:12 -05:00
Sally Coolatta
87a0f81b61 Update polyobject executors (480-492) for ACS
- 480, 483: These originated from Hexen but were set to use line->angle in SRB2, so I reverted them to use args like Hexen again (although using straight-forward integers instead of wacky byte angles)
- 30, 31, 32 ... I edited these because I thought they were executors, oops, but I kept my changes anyway because using args directly is always more convenient than wrangling linedef angles in the map.
- The rest: Usage is completely unchanged.
2022-12-27 06:58:00 -05:00
Sally Coolatta
e48f154bfd Update executors 402, 408, 439
These now use their first arg as a tag to copy properties from, with 0 falling back to old behavior, so that they can be more useful for ACS.
2022-12-27 06:12:31 -05:00
Sally Coolatta
8eef5efa95 Fully port the ACS integration to C++ 2022-12-23 04:38:05 -05:00
Sally Coolatta
2a790d10da Merge branch 'master' into acs 2022-12-22 08:24:21 -05:00
toaster
f179a3523f Clean up M_UpdateUnlockablesAndExtraEmblems and related
* `gamedata->unlockpending[MAXUNLOCKABLES]` stores info to prevent the same unlock causing multiple sounds, and simplify `M_GetNextAchievedUnlock`
* Remove the DEVELOP cechotext
* Each unlock on the challenges menu updates all the unlockables, rather than just `M_CheckUnlockConditions`
* The unlock update function handles the incoming unlock sound itself if `loud` is true. This will allow us to quickly replace every sound at once when we've made a decision what to use

Also:
* Fixes the size of the savebuffer allocation in `G_SaveGame` to account for the challengegrid array.
2022-12-11 16:59:11 +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
845fe12b52 Conversion to using gamedata_t
A small piece of (STJr/SRB2!1756).
Due to how RR currently handles time attack records and how it WILL handle unlocks, it's not currently feasible to split everything such that you can have two independent gamedata_t... but what's done so far is certainly more sane and less dependent on global variables
Other minor refactors:
- M_UpdateUnlockablesAndExtraEmblems and M_SilentUpdateUnlockablesAndEmblems are now one function with a boolean for loudness
- Unlock prints are currently living in the console, since the cecho stuff was a little broken
2022-11-30 13:19:21 +00:00
toaster
6a2aa87e95 Fix unlock bounds check for linedef type 319
Fix from (STJr/SRB2!1767)
2022-11-29 17:44:25 +00:00
toaster
bb66a536a9 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into unlockables-undefeatable 2022-11-28 22:32:13 +00:00
toaster
49c71962f5 Update linedef type 441 to only not happen in MP (or demo playback)
Only areas missed from the precursor to the "multiplayer emblems" MR
2022-11-28 22:29:36 +00:00
Sally Coolatta
581b989fe4 Fix bots being unable to trigger
UDMF regression
2022-11-27 03:00:48 -05:00
Sally Coolatta
05e74c3e9d Fix linedef 499 conversion 2022-11-27 02:57:48 -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
Sally Coolatta
4c7519dffb Allow ACS to call linedef specials as functions
A handful need adjusted to move more stuff off of linedef and into args, but otherwise works well.
2022-11-14 21:43:01 -05:00
Sally Coolatta
5b49f8a492 Merge branch 'master' into acs 2022-11-14 11:19:42 -05:00
toaster
c4fd7d74dd P_AddWadFile partial stages port from SRB2Kart 1.6
Originally written by x.organic, flattened rewrite due to massive changes between RR and SRB2Kart codebase
Notable changes:
- p_adding_file has been reworked into partadd_earliestfile to allow for final setup to use
- much like the public version required removing TEXTURE SOCs, this one required removing Flats support from ANIMDEFS
2022-11-04 16:15:53 +00:00
Sally Coolatta
aad784775a Merge branch 'master' into acs 2022-11-03 19:53:43 -04:00
toaster
e5d1b39e30 Add R_RelativeTeleportViewInterpolation
Adjusts pview_old for relative teleport to attempt a contigious motion
2022-11-03 13:52:17 +00:00
AJ Martinez
8d2d6bfc78 Ironman: return to base character when exiting 2022-11-03 03:38:56 -07:00
AJ Martinez
8c800cf88e Ironman: use introtime transform in non-race 2022-11-03 03:38:55 -07:00
AJ Martinez
8cc535925b Ironman: Randomize every lap and after intro 2022-11-03 03:38:55 -07:00
James R
42f9443de1 UDMF: Add back #900 and #901 additive, subtractive special alpha values for FOFs
Fix fourth digit blend mode being off by one.

see ebe38ff518
2022-10-16 18:07:39 -07:00
Sally Coolatta
8953cf54bb Speed Pads are now a TERRAIN effect
- Use `SpeedPad` to set the strength. Intended to be scaled like Trick Panels, so 1 for yellow, 2 for red, so on. Can use floating point.
- Use `SpeedPadAngle` to rotate the thrust direction. This is in the same system as map angles, so east is 0, north is 90, west is 180, and south is 270. Also accepts floating point.
- Speed Pad angle accounts for the flat alignment itself, as well.
- Like Sneaker and Trick Panels, the sector / line special are now deprecated.
2022-10-11 02:26:54 -04:00
Sally Coolatta
6fb56cc940 Finish line + respawn line use args 2022-10-10 09:12:41 -04:00
Sally Coolatta
7f75501606 Linedef 80 updated
- Uses args instead of texture offsets.
- Compares tag lists, instead of thing angle.
- Made the arguments accept 0 as a "catch-all" option (args[0] == 0 means don't care what type it is; line tag == 0 means don't care what tags they have)
2022-10-10 08:55:49 -04:00
Sally Coolatta
aa7e26e40e Fix credit on ChangeMusic, use args 2022-10-10 08:03:41 -04:00
Sally Coolatta
032ffafd39 Award Player Rings uses args for overload 2022-10-10 07:02:45 -04:00
Sally Coolatta
a8ac5a9922 Make Kart Z FOF Thwomp delay use args 2022-10-10 07:00:08 -04:00
Sally Coolatta
3f94c6def8 Fix wrong names 2022-10-10 06:10:38 -04:00
Sally Coolatta
21dd68d392 Reimplement Invert Encore
Also add removal warnings for sector Sneaker Panels, Trick Panels, and fast-approaching deprecation warnings for sector Offroad.
2022-10-10 06:08:25 -04:00
Sally Coolatta
6403df0a0a Add LAP script type
GDCC just updated after my feature request for remappable script type names, so there's no more limitations surrounding those.
2022-10-09 21:05:25 -04:00
Sally Coolatta
f2a815ddca It's actually just one type 2022-10-09 03:14:59 -04:00
MascaraSnake
3b971835ee Add Lua backwards compatibility for FOF flags 2022-10-09 01:56:50 -04:00
Nev3r
5c9599f0a9 "UDMF: The whole thing" merged
See merge request STJr/SRB2!1714

Barely any RR features reimplemented
2022-10-09 01:13:37 -04:00
James R
05dd7d7871 Merge remote-tracking branch 'origin/master' into HEAD 2022-10-01 14:45:39 -07:00