Commit graph

21469 commits

Author SHA1 Message Date
toaster
4682f03f91 On reflection, whether a map is visited should be cleared at the same time as its time attack record data, not seperately. 2023-05-30 12:21:39 +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
toaster
533508d7b0 Level and cup header information: Hashing for referencing by name
Foundational assistive work.
Also guarantees a consistent cup name length in memory, as some places read/wrote 15 bytes, and some places read/wrote 16 bytes. We settle on the latter (including null terminator) for the broadest backwards compatibility.
2023-05-30 12:21:39 +01:00
AJ Martinez
955d6001b0 "Boolean" 2023-05-30 04:12:47 -07:00
AJ Martinez
04e3a9f4b9 Death tumble 2023-05-30 04:08:45 -07:00
AJ Martinez
136800ec23 When hit at -20 rings, die 2023-05-30 03:03:34 -07:00
AJ Martinez
cfa4f9e135 Botcontrol CV_NETVAR|CV_CHEAT 2023-05-30 02:22:59 -07:00
AJ Martinez
bf901f0166 Add DEVELOP cvar "botcontrol" to disable bot actions 2023-05-29 23:49:08 -07:00
AJ Martinez
3187294deb Charge wavedash boost proportional to turning angle 2023-05-29 23:28:08 -07:00
Oni
ff23501e74 Merge branch 'podium-bugsquoosh' into 'master'
Podium BugSquoosh

See merge request KartKrew/Kart!1258
2023-05-30 03:10:18 +00:00
Oni
3f8ca964c7 Merge branch 'instashield' into 'master'
Instashield (and Guard!)

See merge request KartKrew/Kart!1242
2023-05-30 01:36:45 +00:00
toaster
36d81d7996 Final lack of smoothness in camera cutaway killed: A one-frame window where focus angle/pitch was incorrect due to not having thunk yet 2023-05-30 01:12:59 +01:00
toaster
f24df4f38d Remove the interp-caused jitter from cutaway camera behaviour
It is preferable that smash cuts reset view interpolation IMO
2023-05-30 01:05:20 +01:00
toaster
f9b1bdf2bc K_CalculateGPGrade: Do not penalise for a cup that has no Prisons/Laps at all, so Sealed Star can be reached with numlaps 0/custom Cup with no battle levels 2023-05-30 00:41:28 +01:00
toaster
5e76ea6f8f K_StartCeremony: Directly modify spectator status for bots as early as possible
The problem with bots randomly going towards the same spot in podium was...
- If you failed a Sealed Star, K_UpdateGrandPrixBots wouldn't make the puppies non-spectators
- P_SpawnPlayer catches the spectator status...
- ...but it's in a loop that calls K_GetPodiumPosition...
- ...which ignores spectators...
- ...which means this is too late to catch it, so we simply have to do it earlier.
Also short circuits P_SpawnPlayer's and K_UpdateGrandPrixBot's attempts to set so the author of this commit can be certain what is being done is correct
2023-05-30 00:40:00 +01:00
AJ Martinez
47a63e1ca2 If I ever see another macro I'm going to burn down John Carmack's house 2023-05-28 16:07:32 -07:00
AJ Martinez
4c927b09d1 Review fixup 2023-05-28 15:12:08 -07:00
AJ Martinez
dd5332df83 Smooth out gentleman delay 2023-05-28 01:31:27 -07:00
AJ Martinez
4875311ac9 Slower Drop Dash boost type 2023-05-27 21:55:26 -07:00
toaster
8240dbe4e6 pflags_t, PF_NOFASTFALL: Compilation fix -- 1<<31 is not a valid enum value because it's all signed 2023-05-27 16:47:33 +01:00
Sal
94b2deb4de Merge branch 'twerk-b-gone' into 'master'
One fastfall per input

See merge request KartKrew/Kart!1253
2023-05-26 22:53:17 +00:00
Sal
c7aabfd431 Merge branch 'hexdump-debugfile' into 'master'
debugfile: replace mixed string/control character notation with hexdump

See merge request KartKrew/Kart!1250
2023-05-26 22:43:45 +00:00
AJ Martinez
c7bae4a06b Also prevent fastfall on ebrake ground-to-air 2023-05-26 06:47:22 -07:00
AJ Martinez
1871cad1d9 Require new input to fastfall after bouncing 2023-05-25 23:21:19 -07:00
Oni
9b8306c91b Merge branch 'menu-pokes' into 'master'
Menu Pokes

See merge request KartKrew/Kart!1248
2023-05-26 05:53:16 +00:00
AJ Martinez
691311ab14 Merge branch 'instashield' of git.do.srb2.org:KartKrew/Kart into instashield 2023-05-25 22:49:23 -07:00
AJ Martinez
20f57d7efa Don't drop emeralds unless it's a new hit 2023-05-25 22:49:14 -07:00
Sally Coolatta
ce7e083e13 Bots: Add instashield behaviors
Also tidied up some of the ring usage code.
2023-05-25 15:31:33 -04: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
James R
3ad30c0c7a debugfile: replace mixed string/control character notation with hexdump
Example of old notation:

    [10]O[0,0]jartha[0,254,142,131]c[133]hL^{[170][[251,199]+E[181]U+t[247,183,129,165,152]#$[164,22,10,169]r[150,212,3,232,3,0,0,2,0,0,0,8,0]0[8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,9,2,0,0,1,0,217,161,192] D[0,0,0,0,0,0,0]

Example of new notation:

         0:  01 0e 6a 61  72 74 68 61  00 57 00 09  5a 00 42 00  ..jartha.W..Z.B.
        16:  02 01 00 b7  6a d4 20 6f  2b 45 b5                  ....j. o+E.
2023-05-24 18:33:22 -07:00
James R
f35de20c72 io: Fix name lookup for read_exact friend specializations 2023-05-23 23:05:44 -07:00
Eidolon
a2ea3bfd6c io: Specialize read_exact for Span/VecStream
These will always enter infinite loops in read_exact under correct use
when there is not enough data in them to read to the buffer, so we can
throw out early for EOF in those scenarios.
2023-05-23 23:04:34 -07:00
Eidolon
b8dabe82cf Revert "hwr2: Track colormaps and lighttables tex globally"
This reverts commit aa48237928.
2023-05-23 09:05:23 -05:00
toaster
8845f36a3d HU_DrawRankings: Adjust slightly
- Only show `Lap 0/Lap 1` if numlaps > 1, to match other circumstances where laps aren't real
- Only show player roundscore if gametype supports roundscore
- Otherwise accept a blank right side of the player bar in custom gametypes. (one day for Lua..?)
2023-05-22 15:32:07 +01:00
AJ Martinez
d9dda87586 Hide hitbox on nocollide whip 2023-05-20 16:30:35 -07:00
toaster
a0f0c83975 M_DrawMenuTyping: On Virtual Keyboard, highlight when system button presses occour
- A
- B/X
- C
- Start
2023-05-21 00:14:11 +01:00
toaster
04d87bfb6c M_MenuTypingInput: In Virtual Keyboard mode, assign some buttons as shortcuts
- Start: closes the menu
- B/X: backspace
- C: Toggle shift/caps lock
2023-05-21 00:04:45 +01:00
toaster
f24a640e04 Increase reliability of menuKey system
The intersection between processed buttons and raw keyboard data is a messy one and will probably never be perfect, but it is now consistent.
- Never overwrite a valid keyboard menuKey recieved this frame with a -1 if a different type of event is recieved as well.
- Store previous state of dpad_lr and dpad_ud on menucmd struct.
    - Previously, if `a` was bound to Turn Left, it could produce a valid menuKey for one frame, then be considered a leftward input - switching from manual keyboard to Virtual Keyboard.
    - It still only produces a valid menuKey for one frame... but we simply filter out leftward inputs that are older than this frame to keep things (relatively) clean.
2023-05-20 22:37:31 +01:00
AJ Martinez
18d84c6c2c Fix instawhip follow hitlag 2023-05-20 14:35:48 -07:00
toaster
df31f7cf3a M_HandleMenuInput: Fix incorrect menuKey comparison that was preventing the Virtual Keyboard from ever being activated on first opening 2023-05-20 21:03:23 +01:00
toaster
fb578d7da2 Add-ons menu: Add name and tooltip for Search/filter field
Now visible via Virtual Keyboard.
2023-05-20 20:43:41 +01:00
toaster
38ddfeeef8 Make virtual keyboard even stronger
- Show a textbox (with highlighted border) so the console font is more likely to be legible.
    - Increases the width of the virtual keys to match this.
- Show menu entry name and tooltip on faded view (if they exist), for additional context for what you're writing
- Make the text entry and the virtual keys slide seperately
2023-05-20 20:43:00 +01:00
Eidolon
2918f9b61c Merge branch 'more-rhi-stuff' into 'master'
More RHI improvements for HWR2

See merge request KartKrew/Kart!1246
2023-05-20 15:45:34 +00:00
AJ Martinez
85bfd5be12 Really, really drop emeralds from monitors dead center on the ground 2023-05-20 02:53:13 -07:00
AJ Martinez
3b947ebf85 Instawhip: On mutual contact, clash! 2023-05-20 02:39:05 -07:00
AJ Martinez
211e28611b Instawhip: No mercy 2023-05-20 00:15:05 -07:00
AJ Martinez
53a2a999d2 Whoops, that's a testing condition 2023-05-19 23:45:52 -07:00
AJ Martinez
2c44bafe74 Misc fixup 2023-05-19 23:43:53 -07:00
AJ Martinez
de8f4812cf Split instashield and guard cooldown 2023-05-19 23:30:20 -07:00
AJ Martinez
cac02bb01a Emerald fixups 2023-05-19 22:51:06 -07:00