Open markusmarkusz opened 7 years ago
http://wiki.garrysmod.com/page/GM/PlayerShouldTakeDamage It's called server-side only.
http://wiki.garrysmod.com/index.php?title=GM/PlayerShouldTakeDamage&diff=16933&oldid=12999 It's still in shared.lua of the base gamemode.
Somewhere (I think in the Sandbox gamemode.) there is a comment that says PlayerShouldTakeDamage is shared.
It technically is a shared hook as it can be called from the engine to Lua on client, but there's nothing in the engine that triggers the conditions on the client which is why it is never called on client in Lua.
The comment in Sandbox says:
This is a shared function - the client will think they can
damage the players even though they can't. This just means the
prediction will show blood.
If I understood correctly, this hook was responsible for seeing blood if you shoot at someone, right? Which hook does this now? Is there any reason left to have this hook shared?
ScalePlayerDamage should work for stopping blood particle effects.
Details
GM:PlayerShouldTakeDamage()
isn't called shared.Steps to reproduce
Add a hook to test it.
As far as I know, it was a shared hook. (Somewhere I read it was a predicted hook.)