Age | Commit message (Collapse) | Author |
|
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!
|
|
|
|
Because why not.
|
|
|
|
This will save users having to install the VS runtime in order to load
the plugin. Turns out there was very little to implement to make this
work.
Turning off stack probing might cause spooky outcomes further down the
line but we'll burn that bridge when we get there.
|
|
Reminder not to actually use any of the code I write until it's at least
been included in a few releases of something. :^)
|
|
Nothing really works yet, but at least test.h and fastspin are fixed and
some of the issues with RTTI and libdl and stuff are maybe kind of
sorted, subject to more testing later.
The main issue now seems to be the cvar interface not quite lining up
and crashing pretty much immediately. That'll probably take a lot more
debugging to figure out, which likely still won't be a priority for
quite a while.
|
|
Apparently there's slightly longer code for whatever reason which made
32 too conservative of a search window. Easy fix!
|
|
|
|
|
|
A lot of this is random WIP from a while back, at least a month ago, and
is being committed now to get it out of the way so that other patches
can be brought in and integrated against it without causing headaches.
Also rolled into this commit is a way to distinguish plugin_unload from
exiting the game. This is required for another soon-to-be-integrated
feature to avoid crashing on exit, and could in theory also be used to
speed up unloading on exit in future. While we're at it, this also
avoids the need to linearly scan through the plugin list to do the
old branch unloading fix, because we can.
Rough summary of the other smaller stuff I can remember doing:
- Rework bitbuf a bit
- Add some cryptographic nonsense in ac.c (not final at all)
- Introduce the first couple of "chunklets" libraries as a sort-of
subproject of this one
- Tidy up random small bits and bobs
- Add source for a small keypair generation tool
- Rework democustom to be very marginally more useful
|
|
Absolutely no idea how long this has been broken for!
|
|
|
|
|
|
There's a solid chance this actually gets used this time. Plus, there's
breaking changes, so it makes sense to update before writing any actual
code for it.
The RNG module is also manually fixed up; upstream wasn't moved to the
new Monocypher APIs which might be because the authors don't seem to
think it's even a good idea to use anything other than arc4random().
Maybe I'd kind of agree with that if not for both Linux and Windows not
having arc4random(), and none of SSTs use cases requiring it either
(none of the crypto code is gonna be multithreaded and certainly none of
it is gonna fork).
|
|
That sorting function was a bit wonky, so make it just a little bit
wonky instead. chibicc would produce confusing lex errors if given a
stray single quote somewhere, so make it give non-confusing errors.
Also get rid of canonicalize_newline() because it's unnecessary for SST
so long as Windows Git isn't left in its default misconfigured state.
|
|
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!
|
|
|
|
This also tidies up library handle grabbing with more os.h stuff, and
improves the VDF creation logic - since we no longer store a couple of
paths which makes it necessary to change that a bit anyway.
|
|
Of course, Portal doesn't actually check this properly, and it was never
tested well enough until just now. This fixes it, albeit in a really
stupid way. C'est la vie.
|
|
The zip date is tomorrow as that's the expected release date pending
some testing and hearing back from Portal people re official approval
for use in runs. With any luck it won't need to be bumped further.
|
|
There's absolutely no reason these ever wouldn't be there.
|
|
|
|
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.
|
|
Might as well return the length since we have it anyway. Also this maybe
fixes the totally busted Linux code but it's still untested and probably
doesn't work for reasons that will be discovered later on.
|
|
Pointed out by Bill.
|
|
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.
|
|
This is actually required for an upcoming feature to work, as an
instruction scan bumps into a xorps instruction.
Still not supporting SSE3 or later, or AVX, although at this point it
seems that that would be relatively easy to add, as this thing has kept
growing on an incremental case-by-case basis.
|
|
|
|
For the record, most of this wasn't Bill's fault. I shouldn't be
fixing up patches in the middle of the night. :^)
|
|
|
|
|
|
- Use const in more places where it makes sense - not absolutely
everywhere because it can get a bit annoying
- Make all the instruction search loops a bit more readable by casting
the function pointer into a temporary variable to loop over
- Add a few more doc comments and fix a typo or two
- Make that RTTI thing flexibly-sized, finally
- Don't include gamedata.h in vcall.h for no reason; consequently
include gamedata.h in a bunch of places where it was implictly pulled
in before
- Fix dbg_toghidra() and ent_getedict() having mismatched return types
between their headers and respective source files
- Remove that one broken, hacky, secret Portal non-feature that probably
nobody even ended up using; it can be implemented properly later if
required
|
|
This still isn't totally complete, or used anywhere yet, but it's been
sitting here for literally months, so it might as well get committed so
there's one less thing to deal with later.
|
|
This is a surprise tool that will help us later!
|
|
|
|
Adds tags for L4D2 2147 and Portal 3420. Committer's note: really the
gamedata system might benefit from improvement in the future to support
things like numerical ranges, but this will do for now.
|
|
|
|
In both the engine and SST it's used in more places than just console
printing, so it makes more sense to give it a more appropriate nanme and
location.
|
|
|
|
|
|
I need to write a pre-commit hook to check this or something.
|
|
This has been a known issue for a long time. Let's finally fix it!
|
|
These were never actually used before or this would have been caught
sooner, but as they're being used in some in-progress code this
obviously needs fixed now.
The virtual table indices in use were wrong for some engines due to the
funny thing Windows does with reverse-ordered overloads. The code for
building the plugin's own virtual tables explicitly accounts for this
but calling into existing cvars failed to do so, due to a skill issue.
This fix is kind of inelegant and stupid but making it elegant and
non-stupid is less of a priority at the moment. It should happen
eventually with future improvements to the gamedata system, for some
definition of "should," "eventually," and "future."
|
|
Removes the mem_store functions because they're never used anywhere.
|
|
Note: fixes.c was changed this year, so correct the copyright year too.
|
|
Nobody seems to have been affected by this in the wild yet, thank
goodness. Will probably be a while before there's an actual release, so
hopefully people will continue not to be affected.
I suppose it's only an issue for paths longer than 128 characters, so
it's not too likely to matter under normal circumstances...
|
|
|
|
|
|
Thanks Bill for figuring out what the problem was.
|