Open azalty opened 3 years ago
Cases where knife still goes through guards have been reported on my server. I think the trigger might not be high enough, because it only seems to happen when we aim down. I'll try to scale it better, even though these cases happen rarily.
Also, you can apparently get hit if the knife is thrown on a thin wall, and you are close to the wall. This makes sense because the trigger can actually go through walls. Again, this will be fixed when the trigger is scaled properly.
It shouldn't be a big problem anyways, not a giant priority to fix that. You might want to add a cvar to make people able to enable/disable it if they have noblock
Seems like it might be needed to precache models/error.mdl
as it could be not precached by default.
It was not needed on my server, but I got a crash report from someone running a CS:S server (running the standalone throwingknives plugin without MyJailshop). Precaching this model fixed the crash.
Simple code to add to fix this crash UTIL_SetModel: not precached: models/error.mdl
:
public void OnMapStart()
{
PrecacheModel("models/error.mdl");
}
This patch fixes #51
There are probably other methods but I think this one is a good compromise:
Original issue:
The fix:
Feel free to adjust values and so, I didn't calculate trigger bounds that much, but as far as I see, it works perfectly in game!
Specificities:
Setting CBaseEntity to non-brush model models/error.mdl
. Sadly I can't do anything about itmodels/error.mdl
or no. I didn't get any crash whereas while I chose another model, it crashed. I'm assuming it means no.Credits: https://forums.alliedmods.net/showthread.php?t=129597 and other posts about parenting entities and collision groups