aboutsummaryrefslogtreecommitdiff
path: root/gamedata
Commit message (Collapse)AuthorAgeFilesLines
* Fix the infamous Swamp Fever "god mode glitch"Gravatar Hayden K 2025-04-071-0/+2
| | | | | | | | | | | | | | | | | | Turns out this was fixed in version 2112 (October 2012), so it was fairly easy to isolate in Ghidra (I had previously thought this was fixed by TLS). The CDirector::FinaleEscapeState member is used in CDirector::IsFinaleWon (and maybe another function, I don't remember). Prior to Valve's fix, the value was never reset to 0 after finishing a campaign, so when the Swamp (or Crash Course) "minifinale" events ran, the game would behave as though the player was entering the end-of-finale cutscene and block votes, make players invincible etc. 2112 fixed this bug by setting the member back to 0 in CDirector::Reset, so here we just set it to 0 when quickreset is used, since that is essentially the recommended way to start a run at this point. Now co-op hosts won't need to restart their game after finishing a campaign anymore!
* Add L4D1_1015plus and L4D1_1022plus gametype tagsGravatar Hayden K 2025-04-061-1/+2
| | | | | | | | | | 1022 is the update that adds Mac support and introduces some of the already known vtable changes (this update is similar to 2040 for L4D2 in that regard), the tag will also see some use in some upcoming features. The 1015 tag is questionably necessary, but will be used for at least one feature (it's also the update that adds the newer matchmaking interfaces used in l4dreset.c, but having the tag available doesn't help anything there).
* Rename L4D2_2147plus gametype tag to L4D2_2125plusGravatar Hayden K 2025-04-062-6/+6
| | | | | | | Turns out the cvar we use to detect 2147 was actually added in 2125. Since renaming it doesn't currently break anything (and 2125 was a fairly notable code shuffling update, given it was the first update with a native Linux build of the game), it makes most sense to just do this.
* Fix broken behaviour in the L4D2 addon systemGravatar Hayden K 2025-04-061-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | This should greatly improve the experience of running newest/TLS as well as custom campaigns. The bugginess in question is quite a lot to explain so there's some rather substantial exposition via code comments. The actual fixes are comparatively simple, although still a little subtle to get exactly right and took a few iterations to nail down the edge cases. Thanks to bill for helping me with the RE & assistance on writing the hooks/code and so on. I tracked down a lot of this myself, but the end result wouldn't have been possible without his help. Committers' note: I ended up wrangling this change a fair bit, as I am apparently just always wont to do, and also fixed a bug in the process, hence adding my copyright notice as well. Nonetheless, big thanks to aciidz (and bill) for doing the bulk of the *actual* hard work of figuring out how to do any of this! The actual code changes I made to the original submitted patch were relatively minor; a lot of my effort honestly went into attempting to shorten the massive wall of comment text. At the end of the day, there's still a really long comment, but it's just a lot to explain really so it is what it is. I hope it's at least somewhat understandable to a reader, anyway.
* Add basic button input HUDGravatar Matthew Wozniak 2024-09-141-0/+12
| | | | | | | | | | | | Committer's note: this is heavily modified from the original code contributed by woz (and somewhat improved by bill and aciidz). Copyright notices reflect joint authorship accordingly. woz still gets commit authorship though because it feels wrong to yoink that from someone. :^) And yes, the original code was written in 2022. Time flies. A lot of the code is still kind of hacky and ugly and I'd like to improve it later but there's other things to do so that can wait.
* Improve the HUD API slightlyGravatar Michael Smith 2024-09-081-0/+3
| | | | | | | - Add text size measurement (for centring etc.). - Add a wchar_t equivalent since ushort would be wrong on Linux. Avoid actually using wchar.h because it's a big bloaty header, particularly on Windows.
* Improve L4D warp testing and add visualisationGravatar Willian Henrique 2024-08-302-0/+8
| | | | | | | | | | | | | | sst_l4d_testwarp will now unstick the player unless "staystuck" is specifed as an argument. Additionally, sst_l4d_previewwarp is added to show the positions checked by the unstuck logic as well as the line-of-sight traces performed. Committer's note: the actual box-drawing logic was essentially rewritten by me since I realised the order of drawing didn't matter at all. All the code-digging logic is more-or-less still what bill wrote, though. So, you could say we have joint authorship of this, I suppose. Not that that's a huge deal, but if anyone's ever curious or if it ever legally matters for some reason then, well, there you go.
* Add very basic client console messaging for L4D2Gravatar Michael Smith 2024-08-291-2/+5
| | | | | | | | This isn't totally ideal - it'd be nice to have a way to get colours working, at least for errors/warnings. But it might not really be possible to do that without custom networking stuff, so this will do for the forseeable future. The main goal is just to be able to have CON_SERVERSIDE commands actually give output to the relevant player.
* Fix mkentprops for real this time, probablyGravatar Michael Smith 2024-08-291-1/+1
| | | | | Last fix was apparently enough to make the release work, but not enough to actually work in general, lol. With any luck, it's actually good now.
* Fix Teleport gamedata for sst_l4d_testwarp on L4D2Gravatar Michael Smith 2024-08-261-2/+2
| | | | | | Of course, something was bound to get screwed up by all those changes. And of course, I was bound not to test stuff well enough in the rush to make a useful update. Argh!
* Fix PEntityOfEntIndex gamedata for Portal 4104Gravatar Matthew Wozniak 2024-08-231-1/+1
| | | | This enables the FOV feature to work correctly.
* Rewrite the gamedata and entprops systems entirelyGravatar Michael Smith 2024-08-2314-351/+291
| | | | | | | | | | | | This removes the horrible janky old KeyValues parser and replaces it with a couple of trivial ad-hoc text parsers. In doing so, make the format of the actual gamedata files more human-friendly too. We also gain support for nested SendTables in mkentprops, which are required to get at various things like player velocity. And, the actual string matching is made more efficient (or, at least, more scalable) by way of a cool radix tree thing which generates a bunch of switch cases on distinct characters.
* Hide custom crosshair in menus/load screensGravatar Michael Smith 2024-05-271-0/+13
| | | | | | | | | | This isn't perfect logic - the standard crosshair has a lot more cases where it's not displayed - but it's better than nothing and avoids looking stupid as often. In the process, also fix the IConVar virtual table being one entry too small, which somehow wasn't a problem until it led to vtidx_IsInGame here getting clobbered and causing hard-to-debug crashes. Woopsy!
* Add VGUI HUD overlay drawing featureGravatar Matthew Wozniak 2023-12-193-0/+102
| | | | | | | Currently only supports Orange Box and Left 4 Dead branches. There's quite a large amount of gamedata involved in making this work, and figuring it out for the likes of Portal 2 doesn't seem like a major priority at the moment.
* Cancel fast-forward after the player disconnectsGravatar Michael Smith 2023-12-171-0/+8
| | | | | | | | Avoids spurious and confusing fast-forward behaviour in the event of resetting a run, then disconnecting early and deciding to load some other map. Also fixes a stupid typo (s/propand/propane/).
* Add gamedata for autojump in Portal 3420Gravatar Hayden K 2023-12-041-1/+5
|
* Fix Left 4 Dead Survivors crashGravatar Michael Smith 2023-12-041-2/+8
|
* Add cutscene skipping to L4D quick resetGravatar Michael Smith 2023-12-041-0/+10
| | | | Also done with quite a lot of RE help from bill - thanks again!
* Add a way to fast-forward game timeGravatar Matthew Wozniak 2023-11-261-0/+20
| | | | | | | | | | | | This will be mostly useful for skipping cutscenes in Left 4 Dead games. It may work in other games, but probably won't really be as useful. Committer's note: this was adapted a fair bit from woz's original code, hence the joint copyright, but he did most the hard work of figuring out how to get this deep into the engine's call stack. Thanks! bill also provided a fair bit of help figuring out missing gamedata and fixing compatibility with L4D2 2147 and later. Also thanks!
* Change "plain" filetypes to the proper "text"Gravatar Michael Smith 2023-08-305-5/+5
|
* Add gamedata for mouse scaling in newest L4D1Gravatar Hayden K 2023-08-021-0/+1
|
* Add more GetEngineBuildNumber offsetsGravatar Willian Henrique 2023-06-201-3/+12
|
* Fix L4D VGuiConnect/VGuiIsInitialized gamedataGravatar Willian Henrique 2023-06-151-2/+2
| | | | | | | This was actually breaking deferred initialisation in 0.5, the main observable effect being that the L4D1 console spam fix stopped working. Committer's note: woopsy!
* Adapt vote reset code into fast campaign resettingGravatar Michael Smith 2023-06-031-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is kind of a breaking change but the other code was obviously never released or relied on by anyone - it will be pushed at the same time as this in fact. It still seems worth having the original committed separately to show the progression of development of the feature, however. Technically the standalone vote cooldown resetting could also be added back if ever desired however there doesn't seem to be that much of a use case for that at the moment. This feature ought to be a lot more convenient now as it allows for resetting back to a set starting point no matter where the player is in a run. It isn't universally useful as All Campaigns Legacy solo runs require switching to a different type of server and Main Campaigns co-op runs require restarting the game after Swamp Fever to work around the god mode bug, however it is still useful in a good few situations. Unfortunately this turned out to be pretty complex to implement, first requiring a bunch of interop with valve's rather wacky KeyValues stuff, and then requiring a bunch of especially difficult reverse engineering of L4D1 v1.0.0.5 because it doesn't use said KeyValues stuff and does something else completely different instead. A side effect of all this work is that the nag removal hack is now part of the KeyValues stuff in kvsys.c, which is kind of a comfier place for it than just kind of dumped in the middle of sst.c.
* Add command to reset L4D2 vote cooldownsGravatar Willian Henrique 2023-05-211-0/+6
| | | | | | | | | | | | In most versions of L4D2, players cannot call a vote (e.g. switch campaign, change difficulty, restart campaign) more than once every 3 minutes. This makes resetting on a first map a pain, usually requiring reloading the map to reset the vote state. This new sst_l4d_vote_cooldown_reset command empties the list of structures tracking vote callers, allowing all players to vote again immediately. This should make resetting runs a lot easier on versions without unlimited votes.
* Implement APIs to control demo recordingGravatar Michael Smith 2023-05-051-0/+1
| | | | This is a surprise tool that will help us later!
* Fix deferred init for Portal 2 compatibilityGravatar Michael Smith 2023-01-151-1/+8
| | | | Thanks Bill for figuring out what the problem was.
* Add basic mouse input scalingGravatar Michael Smith 2022-12-251-0/+8
|
* Add stuff to track keypressesGravatar Willian Henrique 2022-07-231-1/+7
| | | | | | Committer's note: this is somewhat adapted from Bill's original code, written a while back, but he gets full credit for actually doing the hard part.
* Properly solve load order issues via deferred initGravatar Michael Smith 2022-05-191-0/+3
|
* Add a quick stopgap hack for Portal purposesGravatar Michael Smith 2022-05-191-0/+1
| | | | | | | | | | People want to be able to write a scheduled-release passphrase to demos to prove that said demos were recorded during a timeboxed event. Ideally this is something that'd be part of the custom demo data and general RTA run management stuff that's planned, but of course that doesn't exist yet. When it does exist, we'd probably want rid of this nonsense, so it's marked hidden and I don't plan to document it anywhere "official." It's just here for people who really need it in the short term.
* Fix GetEngineBuildNumber and entity property stuffGravatar Michael Smith 2022-05-151-4/+7
| | | | | | | | | | I still haven't bothered to flesh out all the possible indices for GetEngineBuildNumber but we're back to being able to use it to detect The Last Stand (as a result of some old version testing Aciidz did - thanks again!). This means we can do away with the terrible map file- based hotfix. Also, turns out sst_l4d_testwarp doesn't work if the plugin gets loaded early via VDF because certain SendTable offsets start out negated, so we work around that too now.
* Properly finish refactoring con to use gamedataGravatar Michael Smith 2022-05-134-4/+17
|
* HOTFIX: Fix L4D2 2.0.0.0 crashingv0.3-HOTFIXGravatar Michael Smith 2022-05-062-4/+6
| | | | Idiotic problems require idiotic solutions.
* Add entity property finding and L4D warp testingGravatar Michael Smith 2022-05-033-2/+75
| | | | | | | | This was a lot more code than expected, but it might be finally close to time to release the next beta... We'll see if any more rabbit holes present themselves to jump into, though.
* Centralise engine access, add Portal FOV changerGravatar Michael Smith 2022-04-301-0/+10
| | | | | | | | | | | | | | | - A bunch of stuff is now defined in one header, engineapi.h - engineapi.c is responsible for setting up any interfaces/stuff that's used in more than one place - mkgamedata is pretty much rewritten and now supports nested conditionals - gamedata variables no longer have the gamedata_ prefix because it was just annoyingly long all the time - vcall macros are somewhat revamped and support dynamic (gamedata) indices - Portal 1 FOV can be set anywhere from 75-120 using fov_desired - tested in both the main versions currently used by runners - A few typos were also fixed ("intput," "writeable," "indexes")
* Add engine_no_focus_sleep backport, fix codegenGravatar Michael Smith 2022-04-251-0/+8
| | | | Default gamedata values actually work the way they're supposed to now.
* Add L4D:S CheckJumpButton index for autojumpGravatar Hayden 2022-03-191-0/+1
|
* Reintroduce autojump codeGravatar Michael Smith 2021-12-271-1/+1
|
* Initial public snapshotGravatar Michael Smith 2021-11-202-0/+25
With code from Bill. Thanks Bill!