Commit graph

1469 commits

Author SHA1 Message Date
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
toaster
deca3cb911 Add mid-fade warp sound per suggestion 2023-06-03 20:40:01 +01:00
toaster
10c18fe3fa Podium Music
Uses the multiple alt music options of the podium map's level header in a specific sequence, so it can slot in to the Stereo Mode music list natively, and so custom Podiums don't have to replace existing tracks to function.
2023-06-03 14:20:48 +01:00
toaster
a2902ab1ff Use to-white fade when entering a map via skipstats 2023-06-03 00:51:51 +01:00
Oni
9724144e99 Merge branch 'gamedata-extension' into 'master'
Gamedata Extensions

See merge request KartKrew/Kart!1262
2023-06-02 03:40:57 +00:00
toaster
1821b4f52d P_InitThinkers: Handle several important mobj cleaning tasks in one place, rather than scattered
- titlecam.mobj cannot have P_SetTarget applied when initially setting to NULL, as its previous occupant is some unknown region in memory, and modifying the reference count could in fact change some random number or address ANYWHERE IN THE ENTIRE PROGRAM.
- So we straight up wipe it rather than referenced-unset it in one place, always, for general tidiness.
- Also move skyboxcenterpnts, skyboxviewpnts, and iquetail/iquehead so it's all centralised.
2023-05-31 12:49:51 +01:00
toaster
4c34d04f8a recorddata_t handling adjustments
Preperatory work for the next feature on my agenda.
- No longer independently allocated.
    - This was a byproduct of the previous NUMMAPS-based implementation. It's just cleaner to have it live directly on the mapheader_t, no caveats about it.
- Now contains mapvisited bitflag array.
    - Now all to-gamedata properties on a mapheader's struct are grouped together.
        - I was of two minds about it, but decided that this would have cleaner guarantees for compartmentalisation, saving, and loading.
        - They can still be wiped independently (G_ClearRecords for time/lap and M_ClearSecrets for mapvisited).
2023-05-30 12:21:39 +01: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
Sally Coolatta
d953049c78 ACS: User properties can tell bool from string 2023-05-02 18:44:30 -04:00
Sally Coolatta
d9382f2100 ACS: UDMF user properties
Lines, sides, sectors, and things now all support the "Custom" tab properly. Label a property as `user_[whatever you want]` in this tab, and it will be added to the structure. ACS will then be able to retrieve it using the `Get[x]UserProperty()` function.
2023-05-02 18:44:27 -04:00
Sally Coolatta
60e80d876d Improve quake effects
- Quake epicenter + radius now work.
- Since quake epicenter works, removed the display player check on all of the quakes, so other players can feel them.
- Multiple quake effects are stored in a linked list and dynamically created/freed, so they can stack together.
- Made in china
- Made the quake effects only work on the z axis.
- Quakes now alternate their intensity and dampen it over time, instead of randomly picking values.
- Added quake effects for offroad and stair-jank
- Disabled quakes in reducevfx
- Removed actionmovie and windowquake (sorry jartha)
2023-05-01 14:24:32 -04:00
toaster
581567dfae musiccountdown
A system for level completion jingles.
- G_Ticker
    - Call P_EndingMusic after a certain amount of time has elapsed to begin a jingle
    - Play O_RACENT after the jingle's completion instead of baking it or an equivalent into the music
- P_EndingMusic
    - Change the function signature to not take a player
    - Pick from a series of const char* jingles, instead of sprintfing into a buffer
        - _first
        - _win
        - _lose
        - RETIRE
    - Simplifying logic to handle intermission music
2023-04-30 21:47:07 +01:00
James R
c54f1a52bd G_LoadDemoInfo: don't read outside of the buffer if the file is too small 2023-04-25 18:49:31 -07:00
Sal
0fb691022b Merge branch 'fix-reset-interpolation' into 'master'
P_Ticker: update view interpolation at the start of a tic

See merge request KartKrew/Kart!1192
2023-04-25 01:50:51 +00:00
toaster
3d0abdd74a Merge branch 'follower-audience' into 'master'
Follower Audience

Closes #498 and #325

See merge request KartKrew/Kart!1185
2023-04-24 21:49:34 +00:00
James R
e8a8064da9 P_Ticker: update view interpolation at the start of a tic
This lets R_ResetViewInterpolation only need to be called
once from game logic.
2023-04-22 20:40:35 -07:00
toaster
2f8b8cf532 Follower lists: Fix typing
Should consistently be signed INT16, not unsigned UINT16
2023-04-21 20:52:13 +01:00
toaster
d7547edf05 P_SetDefaultHeaderFollowers: Add Motobuddy to the list as Eggman deserves his homies 2023-04-20 23:22:35 +01:00
toaster
a74b7995c9 Implement Follower Audience object
- Replaces Chao audience entirely
    - Convenient, because one of the two default follower types used in the audience is Chao
- Can provide one follower, or a list of followers, on the stringarg1 (seperated by spaces/commas) and it'll pick randomly between them
    - If not provided, uses the mapheader follower list
- Can provide one skincolor, or a list of skincolors, on the stringarg2 (seperated by spaces/commas) and it'll pick randomly between them
    - If not provided, uses the follower's default color
    - If the follower's default color is Match/Opposite or the user provides "Random" in stringarg2, pick a random skincolor
- If arg3 is set, floats in the air
    - MTF_OBJECTSPECIAL in binary format
- If arg4 is set, faces the closest player
    - MTF_AMBUSH in binary format
    - Uses some funny mathematical tricks to avoid checking on the same frame as every other audience member at once
2023-04-20 23:15:56 +01:00
toaster
5f15736626 Mapheader Followers system
Replaces Flicky List system from 2.2.
Specify a list of comma-seperated Followers.
Not used by any systems in this commit, but important to store the data for later.
2023-04-20 23:01:13 +01:00
toaster
ea8573a70a ParseTextmapThingParameter: Tidier, more explicit guarantees for null-terminated stringarg handling 2023-04-20 22:57:03 +01:00
Sally Coolatta
77a0e77bf6 Move level load scripting to P_PostLoadLevel
Means these scripts get to have an accurate count of the number of players.
2023-04-18 05:29:58 -04:00
Sally Coolatta
198672c845 Fix vote buffer for G_RandMap being broken 2023-04-11 01:19:30 -04:00
Sally Coolatta
9c4ace6fbc Map anger
- Maps build anger every time a map isn't selected by anyone.
- If a map is ignored for 4 votes in a row, then on the 5th vote it shows up it will be angry enough to vote for itself when everyone else finishes voting.
- Once it gives its funny vote, or it gets played, it will calm down again.
- 13P+ vote icons are implemented; it's just a basic circle though cuz lazy.
- Made the roulette finish even faster.
- Bots can vote again but now behind a debug cvar.
2023-04-10 02:10:06 -04:00
Oni
f615b1a2f0 Merge branch 'acs-trigger-improvement' into 'master'
Improve ACS triggers

See merge request KartKrew/Kart!1131
2023-04-09 03:08:34 +00:00
toaster
94e3803eb0 Merge branch 'blockmap-precip' into 'master'
Render precip through blockmap instead of during BSP

See merge request KartKrew/Kart!1147
2023-04-08 11:21:23 +00:00
Sally Coolatta
010fc344df Add equivalent of "Each Time" triggers for ACS 2023-04-06 18:05:05 +01:00
James R
bced5ecbc5 Render precip through blockmap instead of during BSP
There can be very many precipmobjs in a sector. During BSP
rendering, for each sector reached by BSP (the entire
visible level at least), all the precipmobjs would be
iterated and their distance from the camera calculated, to
determine whether they are within draw distance.

The issue with the old approach is that there really are
too many precipmobjs in each sector. By iterating the
blockmap within a certain range instead, precipmobjs
out of view are not iterated at all, saving some time.

Caveat: drawdist_precip is no longer respected as an
exact value, since it must round to the precision of the
blockmap.

List of potentially scary changes:

- Removes snext/sprev for precipmobj_t
- Removes preciplist for sector_t

- Adds bnext/bprev for precipmobj_t
  - mobj_t and precipmobj_t field offsets are symmetrical

- Modified P_SetPrecipitationThingPosition and P_SetThingPosition
  - The syntax in these functions is kind of wacky
2023-04-06 05:41:06 -07:00
toaster
e732f37258 levelheader_t: relevantskin property
- On level load for GT_TUTORIAL:
    - Forces to requested skin (or Eggman if not specified).
        - Named `relevantskin` and not `tutorialskin` in case it's useful to use the same apparatus later for Adventure.
    - Also sets default skincolor and disables follower.
2023-04-03 00:28:37 +01:00