shanapu / MyJailShop

MyJailShop is a redux rewrite of Dkmuniz Jail Shop and provide you a high customizable shop with credits system intended for jailbreak server.
https://forums.alliedmods.net/showthread.php?t=288712
GNU General Public License v3.0
13 stars 9 forks source link

Fix for throwing knives when using noblock #55

Open azalty opened 3 years ago

azalty commented 3 years ago

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:

Credits: https://forums.alliedmods.net/showthread.php?t=129597 and other posts about parenting entities and collision groups

azalty commented 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

azalty commented 6 months ago

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");
}