Closed Sparktimus closed 2 years ago
Probably, wrong repository for such issue. Need to move to: https://github.com/FWGS/hlsdk-xash3d
And if you want you can make PR.
Alright, I will. Thanks for the heads up!
@nekonomicon there is issue transfer btw.
Yes, I think it can be easily hidden under cvar.
I think I saw this feature in some mods before, so I don't think it's unique to SC.
I know it's present in every compiled version of the game, but it's simply commented out for some reason. Another mod called Scientist Hunt also had this feature.
Since pretty much every Goldsrc lib has that combat.cpp file by default, I wonder if there's a way Xash itself could override that setting globally so you wouldn't have to recompile every lib file you want to use it with
Commenting out code means it's not compiled into the binary, so I don't think there is a good way to do this with existing libraries.
Since pretty much every Goldsrc lib has that combat.cpp file by default, I wonder if there's a way Xash itself could override that setting globally so you wouldn't have to recompile every lib file you want to use it with
You may try write metamod/amxx plugin with binary analysis to do this. Engine does not do binary hacks and it is very untrivial to do this at all and maybe even impossible to do automaticly
Since pretty much every Goldsrc lib has that combat.cpp file by default, I wonder if there's a way Xash itself could override that setting globally so you wouldn't have to recompile every lib file you want to use it with
You may try write metamod/amxx plugin with binary analysis to do this. Engine does not do binary hacks and it is very untrivial to do this at all and maybe even impossible to do automaticly
I never thought of using Metamod as a go-between but that could actually work. I have very minimal coding experience but I know enough to at least recompile the binaries I want to change. Most mods anymore use the updated SDK or SOHL libraries for their mod so I don't have too much of an issue just making the changes I need and recompiling, but it'd be nice to be able to do it globally for any mod I'm running at that time, and a plugin might be the only answer to that.
It probably would be enough rewriting CBaseMonster vtable, finding BecomeDead method in it and replacing it with your implementation.
AMXModX's HamSandwich definitely does it.
Though you have to calculate BecomeDead position in vtable for every mod DLL. I don't think most of them modify CBaseMonster but if they do, it shouldn't be hard looking up this function in Ghidra.
The cvar was added to toggle corpse physics. Should we close the issue?
Was poking around in the HL1 SDK for a wee bit trying to figure out how I could get the same corpse physics that Sven Coop has and stumbled upon this within the combat.cpp:
Last four lines are commented out but uncommenting enabled there to be corpse physics similar to Sven's. Why they're disabled is a mystery to me, but I was wondering if it were possible for there to be a cvar of some kind that could toggle this option, or preferably, enable it by default but with the ability to set your own values.