summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)Author
2024-09-08Fix an include-what-you-use omissionMichael Smith
2024-09-08Improve the HUD API slightlyMichael Smith
- 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.
2024-09-08Fix a Linux woopsy in os.c I spotted the other dayMichael Smith
Note: for all I know Linux isn't even compiling right now - I rarely actually test that. But still, might as well fix this since it's an obvious mistake.
2024-09-07Un-break and re-fix x86Michael Smith
The last fix was, uh, not good. With any luck this is actually correct now. Certainly, running many millions of test cases fails to find any mismatch with udis, so it's at least a lot less wrong than it was.
2024-09-06Fix more broken x86 casesMichael Smith
Thanks Evan Lin for reporting.
2024-08-30Improve L4D warp testing and add visualisationWillian Henrique
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.
2024-08-29Add very basic client console messaging for L4D2Michael Smith
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.
2024-08-29Unhide con_logfile in fixesMichael Smith
2024-08-29Add basic server-side tracing functionalityWillian Henrique
Restricted to L4D for now due to known ABI compatibility issues on other branches. This should be easy to fix later when needed elsewhere. Committer's note: I've counted myself as a joint author and added a copyright notice to the .c file since this code is reasonably modified from the code bill originally wrote last year. but June of this year and , so I've gone ahead and corrected his copyright notice too, with permission.
2024-08-29Fix mkentprops for real this time, probablyMichael Smith
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.
2024-08-26Begin the new version cycle yet again at 0.9Michael Smith
2024-08-26Add the one update note to release again, alreadyv0.8-BETAMichael Smith
2024-08-26Fix broken mkentprops code generationMichael Smith
I screwed things up even more than I thought!
2024-08-26Fix Teleport gamedata for sst_l4d_testwarp on L4D2Michael Smith
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!
2024-08-26Bump version to 0.8 for next releaseMichael Smith
2024-08-26Add update notes and bump zip version for releasev0.7-BETAMichael Smith
2024-08-23Add a quick hack fix for Portal 4104 demo playbackMichael Smith
Thanks Evan Lin for doing the hard RE work to figure out the necessary patch - I just reimplemented that here in about the dumbest way possible.
2024-08-23Fix PEntityOfEntIndex gamedata for Portal 4104Matthew Wozniak
This enables the FOV feature to work correctly.
2024-08-23Rewrite the gamedata and entprops systems entirelyMichael Smith
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.
2024-08-23Fix an old and stupid woopsy in hud.hMichael Smith
This wasn't woz's fault - I did some wrangling of his code and introduced this woopsy without noticing. Thanks to aciidz also, for pointing it out recently. Not touching the copyright years because it's such a stupidly trivial thing - I can't really claim to have done anything substantial here.
2024-08-23Revise syntax macros and add a ton of branch hintsMichael Smith
My new programming style is branch hints. All non-confusing branches must be hinted when I can be bothered. It's faster, sometimes, maybe. Also, start trying to use more signed sizes in at least some of the places where it makes sense. Unsigned sizes are surprisingly error-prone!
2024-08-22Prevent errorlevel weirdness in compile.batMichael Smith
This is an issue I've known about for a little while and kept forgetting to fix here. It's not been a huge issue for anyone, but still, improving correctness is always a good thing. Essentially, if you run a batch file straight through cmd /c, rather than interactively, exit /b with no number doesn't actually propagate the errorlevel value correctly, which is obviously bad. To fix this, just jump to the end on error and then explicitly return the errorlevel. If everything succeeds, this will of course still return 0, as expected. Special thanks go to Microsoft for writing this bug decades ago and never fixing it, probably in the name of backwards compatibility.
2024-08-22Rework OS abstractionsMichael Smith
- As much as possible avoid dragging system headers into translation units. This should avoid namespace pollution and, hopefully, speed up builds a little bit. - Avoid leaning on the UCRT so much on Windows - prefer native win32 calls and native file handles except where doing so is inconvenient (in particular, for stat(), which we might try and replace later). - Also, switch from SystemFunction036 to ProcessPrng on Windows. This requires us to generate a stub for bcryptprimitives.dll because Microsoft haven't bothered to provide a link library, but the function is better-documented and seems to be a more direct under-the-hood call as well. Apparently it's what's used by the major web browsers these days, which seems like a good indication it's stable and trusted. - Lastly, remove a bunch of functions and macros and stuff that weren't actually being used. It seems good to try and keep the scope of OS-dependent stuff relatively contained and only add to it when actually required.
2024-08-05Bump the version to 0.7, ahead of next releaseMichael Smith
2024-05-28Hotfix broken Portal 5135 autojumpv0.6-HOTFIXMichael Smith
The tf_arena_max_streak check turns out not to work on autoload since the client isn't loaded yet so the cvar doesn't exist yet. Using the server-side cvar tf_escort_score_rate appears to do for now. Also bump the zip date again since I'm doing this after midnight :^)
2024-05-27Set the release zip date for 0.6v0.6-BETAMichael Smith
2024-05-27Hide custom crosshair in menus/load screensMichael Smith
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!
2024-05-22Support fast-forwarding 38 custom L4D2 campaignsHayden K
2024-05-22Prepare a changelog for next releaseMichael Smith
2024-05-21Disable fastfwd outside L4D so SPT doesn't breakMichael Smith
2024-05-21Add temporary plugin version identifier to demosMichael Smith
I've resisted doing this for a long time but it's getting to the point where blocking a release indefinitely is a real problem, and this satisfies the original request from some leaderboard people to just make SST identifiable in some way or another. It means the demo stuff can happen at whatever pace it happens at and other stuff can happen independently. Less stress and sadness. Of course, it'll only be kept in as long as required, but there'll be no rush to get rid of it for any particular release either.
2024-05-21Deal with the stupid NVDTOR situationMichael Smith
Bill suggested using abi.h for this. Not sure if it's 100% ideal to need to pull in the whole header for this one macro but it's arguably better than most alternatives and definitely better than just continuing to duplicate it ad nauseam.
2024-05-21Fix compatibility with latest L4D2 updateWillian Henrique
2024-05-05Fix miscategorised jmp instructionMichael Smith
Woops! Thanks Uncrafted for reporting this.
2024-02-26Remove some unnecessary and/or confusing stuffMichael Smith
2024-02-25Update the stupid copyright yearsMichael Smith
I will probably forget to do this every year.
2024-01-22Re-learn how to write C headers, apparentlyMichael Smith
2024-01-21Learn to spell correctlyMichael Smith
2024-01-21Rethink mem_loadoffset, and consequently, kill itMichael Smith
Suggested by bill. Having something semantically pointer-sized that's only ever used for stuff that's always 32-bit doesn't really make sense. Note that I intentionally did not add a copyright line for myself in hud.c because, I mean, come on. I'll just say I waive any claim to that tiny trivial change.
2024-01-21Add a half-decent custom crosshairMichael Smith
2023-12-19Add VGUI HUD overlay drawing featureMatthew Wozniak
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.
2023-12-17Don't compile kv.c as part of SST itselfMichael Smith
Of course, this has only been used at build time for quite a while now. Silly oversight! The linker would have dropped it anyway so this will just avoid some wasted effort.
2023-12-17Cancel fast-forward after the player disconnectsMichael Smith
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/).
2023-12-13Improve quickreset command descriptions a bitMichael Smith
2023-12-05Add fast-forward gaps for checking item spawnsMichael Smith
This complicates things greatly! Therefore, it's a separate commit to the baseline fast-forward functionality, to keep the confusing stuff relatively contained.
2023-12-04Add gamedata for autojump in Portal 3420Hayden K
2023-12-04Fix Left 4 Dead Survivors crashMichael Smith
2023-12-04Add cutscene skipping to L4D quick resetMichael Smith
Also done with quite a lot of RE help from bill - thanks again!
2023-11-26Hook Key_Event instead of DispatchInputEvent in ACWillian Henrique
This fixes a crash in later L4D2 versions caused by the fact we were unknowingly hooking Key_Event already. Now we hook it all the time on purpose.
2023-11-26Fix CPlugin ABI on newer L4D2 versionsMichael Smith
Thanks bill for spotting this issue. It was causing crashes on unload, which is obviously no good.