Commit graph

1497 commits

Author SHA1 Message Date
toaster
1d06637a38 First pass at assigning unique spraycans to level headers
Increments gamedata minor version, be aware
- M_AssignSpraycans
    - Called in M_FinaliseGameData.
    - Attaches a hardcoded set of colours to all race maps in cup order, stopping once we run out.
    - The colours are shuffled, with some "freebies" always at the head of the list.
    - Integrates partial lists pretty well.
    - In DEVELOP builds, I_Errors if it produces corrupted state.
- G_LoadGameData, G_SaveGameData
    - Save & Load is implemented for these assignments
2023-08-19 15:08:55 +01:00
James R
414d6f3647 Don't reset camera position when spectating
Fixes a software renderer crash due to hitlag VFX from the
player's death (death from spectating) being too close to
the camera.
2023-08-19 05:01:41 -07:00
Lach
53b48d057c Rename Lost Colony symbols to Ark Arrows and add 10 new symbol types 2023-08-15 22:47:04 +10:00
Oni
aeb6d6740f Merge branch 'encore-directional-lighting' into 'master'
Add encore variants of LightContrast, LightAngle and SpriteBacklight to level header

Closes #593

See merge request KartKrew/Kart!1388
2023-08-13 06:21:12 +00:00
James R
ebba7c327c Add encore variants of LightContrast, LightAngle and SpriteBacklight to level header 2023-08-11 20:30:30 -07:00
James R
e0562a44e5 Add MSF_DIRECTIONLIGHTING, forces directional lighting on, even indoors
UDMF flag: forcedirectionallighting
2023-08-11 01:42:48 -07:00
James R
70294e62bd Automatically disable directional lighting if the sector has no sky 2023-08-11 01:41:49 -07:00
toaster
8d7c9dd6ce Menu titles for level headers
For the tutorials. Replaces the no longer visible subtitle, since it's roughly analagous in purpose.
2023-08-10 00:28:17 +01:00
James R
e89ecc7a2d Merge branch 'music-technology' into 'master'
Replace music handling

See merge request KartKrew/Kart!1369
2023-08-08 22:19:36 +00:00
AJ Martinez
1cdb498862 DEVELOP cvar to turn off encore palettes (readability testing) 2023-08-07 19:06:21 -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
James R
46406931c1 Toggle all manner of directional lighting with MSF_FLATLIGHTING 2023-07-27 17:49:45 -07:00
James R
49e7357704 Add MSF_FLATLIGHTING 2023-07-27 17:49:26 -07:00
toaster
b4197a2263 Double-free emergency fix for virtual resources
- vres_GetMap guarantees the same memory for the same lump id, provided it's active
- vres_Free won't delete curmapvirt unless you do some silly temp pointer stuff
2023-07-24 23:40:30 +01:00
Oni
87aab3c881 Merge branch 'music-joining' into 'master'
Fix music on midgame server join

Closes #473

See merge request KartKrew/Kart!1351
2023-07-23 17:51:47 +00:00
Oni
b82392dee6 Merge branch 'more-conversions' into 'master'
More UDMF conversions

See merge request KartKrew/Kart!1336
2023-07-23 17:24:17 +00:00
toaster
7c952e3509 Tidy P_LoadLevel music starting a little 2023-07-22 18:32:50 +01:00
toaster
e0b47b16e7 Improve Spectator entry handling
- Re-entry SHOULDN'T get stuck nonzero on first join for a given node
    - Set to 0 for all players on level start
    - Set to 0 for all players on level end
    - DEFINITELY never intentionally set on join with teamchange finalisation
    - This basically just prevents people from spamming New Challenger after hopping out mid-session, since the previous version, in addition to being buggy, was a little annoying.
- New Challenger no longer happens on tic 0 of mapload
    - Handles any late, pending PF_PF_WANTSTOJOINs without threat of reset in P_PostLoadLevel
2023-07-22 14:03:11 +01:00
toaster
4885611f47 Move ACS script loading back to P_DoLoadLevel, since on second thought it's just LOADING and not executing anything 2023-07-22 13:17:17 +01:00
toaster
5b4fc18264 P_PostLoadLevel: Move all events directly requiring finalised player lists into this function
- Grand Prix (& backup) and Match Race bot initialisation
    - Fixes rival selection
- P_InitPlayers
    - Has to be after bot init
- Beginning of demo recording
    - Grand Prix and Match Race replays appear to both function far better, and equivalently to boot.
        - A desync in "RNG seed 24" is reported. This is PR_BOTS. This is the only notable desync I can see!
- ACS_LoadLevelScripts
    - I'm not ironclad sold on this being the forever home, but it's also a not-from-netsave thing, and barring external input I could see some scripts being dependent on a finalised player list.
2023-07-22 13:17:16 +01:00
toaster
034fa4b0a9 Water Palace Turbine UDMF conversion
Requires changes in the script to support which I am not awake enough to finalise or make compatible with other branches. This took far longer than appropriate.
2023-07-15 22:50:53 +01:00
toaster
25f48fd26f Add ML_BLOCKMONSTERS to P_WriteTextmap 2023-07-15 20:08:53 +01:00
toaster
459e3684ab P_GetNodeType: Do not dereference invalid pointer for **nodedata parameter 2023-07-15 19:18:39 +01:00
toaster
ed8007471f Remove binary-relevant text field from side_t (and line_t)
Instead of storing this during binary-UDMF conversion and then copying it for certain argument fields, put it directly onto stringarg[0] (or [1] if it's the backside), then make relevant changes with those.

Reduces the amount of Zone memory used for binary converted maps, and the amount of struct memory used for all types of maps.

They have also been removed from the Lua API. Fret not, the stringargs on line_t have far more utility.
2023-07-12 18:37:00 +01:00
toaster
b61701a1bc Tidier conversion of string properties to UDMF
Previously, concatenated texture field strings were turned to text, then had that string run through get_number, then had it converted back into a string to become a stringarg.

Now, the concatenated string is copied directly to the relevant stringarg.

This fixes an issue where a map with object or state properties would have "context drift" - breaking when the object or state list changed, due to differently ordered freeslots, or new hardcoded objects.

This is also made consistent and with less repeated code via the addition of multile P_Write functions to replace both P_WriteConstant and multiple copypasted blocks of zone allocation and memcpy.
- P_WriteDuplicateText -- fresh zone memory copy with PU_LEVEL
- P_WriteSkinColor -- converts ID to SKINCOLOR_ name, then runs it through P_WriteDuplicateText
- P_WriteSfx -- converts ID to SFX_ name, then runs it through P_WriteDuplicateText

In order to avoid making p_setup.c dependent on `deh_tables.h`, object type 1202 simply artifically produces the expected range of MT_ROCKCRUMBLE1 to MT_ROCKCRUMBLE16. It was technically possible to produce unexpected effects with extremely high offsets, but if your map was doing something like that, you're intelligent enough to go back and swap the MT_ constant out with your intended goal.
2023-07-12 17:13:38 +01:00
toaster
36e0a23c09 Remove console script support from maps
The linedef's behaviour was broken horribly by long map names, and it's not worth the effort to fix it for the following reasons.
- It was considered a security vulnerability to have free access to the console when it was written.
- The game literally had a cvar to disable running console scripts. That's "I am willingly distributing ActiveX Word Documents in 2023" levels of foolhardery.
- Anything GOOD it can do, both Lua and ACS can do better.
2023-07-12 16:32:23 +01:00
toaster
ba5047459c Remove last remnants of Action 434 ("Custom Power")
Had no behaviour, but was being processed
2023-07-12 16:16:56 +01:00
toaster
c5c78df946 Linedef Action 460 (Award Rings) now supports negative ring counts
UDMF now has a native ring drainer effect.

Also fixes the WriteTextmap warning for the deprecated sector effect, which should have been encouraging you to use this action, not action 462!?
2023-07-12 13:17:09 +01:00
Lach
77750438ef Change symbol thing type to 4094 2023-07-11 21:51:29 +10:00
Lach
4ad383721d Add thing type number & binary conversion to symbol signs 2023-07-11 21:04:06 +10:00
James R
b17ae80c15 P_ConvertBinaryThingTypes: convert Rainbow Dash Rings too 2023-07-06 21:15:53 -07:00
James R
f0b12d895e writetextmap: save waypoints correctly, account for risers and anchors 2023-07-01 12:59:56 -07:00
James R
23d8a3f638 Split apart some of P_WriteTextmap 2023-07-01 12:58:38 -07:00
James R
4dcd46d590 P_ConvertBinaryThingTypes: convert dash rings (not yet hardcoded) 2023-07-01 12:55:35 -07:00
James R
d3d6d4d671 MT_BATTLEUFO_SPAWNER: spawn with thing number 3786
Binary maps: angle becomes args[0] (ID for spawning order)
2023-06-29 19:49:36 -07:00
toaster
defd885092 GP Backup tidy (connected to ending gamestate)
- Handle removing GP Backups when any game end sequence is started, not just the Podium (in case no Podium exists)
- Guarantee removal in M_StartCup out-of-entries failure state
2023-06-26 20:54:43 +01:00
toaster
45f8f1c89f Remove a bunch of unused emerald stuff inherited from SRB2
All superseded by M_CheckCupEmeralds + GTR_POWERSTONES stuff
2023-06-25 23:49:20 +01:00
toaster
12ff436877 Make a first-class feature instead of a passworded secret
- Now called "Grand Prix Backup"
- Filename is now `gpringsav.bkp`
- Since available in standard contexts, do a little extra guarding against unsporting behaviour:
    - In non-DEVELOP builds, delete Grand Prix Backup when returning to the titlescreen/menus.
- "undo your extra work and make it more generic" - Tyron
2023-06-25 23:44:37 +01:00
toaster
e372d348cd Live Event Backup
Associated menu stuff is rough and unpolished, but it's 1am for the author of this commit.
- Activated for this session by either of the following Passwords.
    - `savetheframes`
    - `savetheanimals`
    - The idea is that if Ring Racers were ever ran at a GDQ, runners would swear their alliegance to a particular Metroid routing at the startup stage, because I think it's funny and cute.
- A live event backup is created/overwritten on non-cheated grandprix level change.
- It's wiped on reaching the podium.
- When hitting PLAY on the main menu, if a live event backup exists, make a Menu Message.
    - If you hit A, turn live event backups on for this session, and load the backup.
    - If you hit B/X, delete the backup and proceed to character select.
        - Done this way to avoid cheating a different character to the end of GP.
- Unlike the (maybe a little over-)engineering of ringdata.dat, liveringbak.bkp is streamlined as all hells and has very little recovery for differing file lists.
2023-06-25 23:44:37 +01:00
toaster
164f72a6cb "Bored" follower audience toggle (for Chaclon)
- If follower audience member has a certain flag, the bob/jump height is forced to zero
    - UDMF: args[2] & 2
    - Binary: The "Extra" flag
- If a follower audience member (or MT_EMBLEM with GE_FOLLOWER) has a bob/jump height of 0, use the idlestate instead of the movement state
2023-06-20 12:41:42 +01:00
Oni
8b2b3aaee8 Merge branch 'training-mode' into 'master'
Add bot styles & bot spawn ACS function

Closes #564

See merge request KartKrew/Kart!1288
2023-06-19 03:16:30 +00:00
Sal
8622429e07 Merge branch 'bird-slope-sector' into 'master'
Small bird slope improvements

Closes #565

See merge request KartKrew/Kart!1287
2023-06-15 16:08:43 +00:00
Sally Coolatta
54e6efc798 K_AddBot is direct
No longer sends a packet from the server, now all clients do it. Old method is kept just in case.
2023-06-15 12:06:21 -04:00
James R
6b125ea575 Sprite directional lighting, add SpriteBacklight option to level header
- Sprites have directional lighting, like walls
- For normal sprites: contrast is much stronger than walls
- Papersprites look the same as walls

- SpriteBacklight option in level header weakens the contrast for sprites only
  - SpriteBacklight subtracts from LightContrast
  - E.g. SpriteBacklight = 0 would let it match LightContrast
  - E.g. SpriteBacklight = 60 would make the contrast much weaker
  - Negative values make the contrast stronger
2023-06-14 19:56:16 -07:00
Sally Coolatta
ccad5bba12 Small bird slope improvements
- Bird slopes can be made from UDMF sectors
- Group is now argument 3 on the line/sector action and argument 1 on the anchor, instead of using tags.
- The terminology no longer swaps between "tag" and "paramater" -- it's just called "group" now.
2023-06-14 07:58:41 -04:00
Sally Coolatta
cd37542edf Improve Item Capsule spawning
- Spawn them after player count has been calculated properly.
- Move gametype spawning into its own argument. Now instead of 1 flag that said it inverted Time Attack spawning but ACTUALLY just made it spawn in all modes, there's flags for the two gametypes which can be combined. Not setting any will use the old default behavior (rings are in both modes, items are multiplayer-only).
2023-06-14 07:13:26 -04: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
toaster
8efd4788e7 enum gdmusic_t
Replaces existing musicflag system, which only had one flag, with a priority system that overrides menu music in general.
Also adds the CHAO KEY FREE DDL WORKING 2023 goofy music for matchesplayed Chao Key generation.
2023-06-07 23:05:19 +01:00
toaster
4dfa74796a Merge branch 'podium-music' into 'master'
Podium Music + rank fixes

See merge request KartKrew/Kart!1270
2023-06-05 14:41:42 +00:00
toaster
a682c4a9ad Add sfx_endwrp
Dummy sound to be implemented later for the end of a skipstats warp, but the thok actually sounds kind of fun.
Requires skipstats (and nextmapoverride, for cleanliness) to be unset in P_PostLoadLevel instead of P_LoadLevel.
2023-06-03 20:55:00 +01:00