Call of Duty Shellshock
Adds the shell shock from Call of Duty games. It is triggered by receiving blast damage and it lasts 5 seconds.
It is set to false on respawn.
This uses Player:SetLaggedMovementValue() internally, so viewpunch and gravity will be slower!
As of 2023-05-21 11:09 EEST, it is now using CMoveData:SetMaxClientSpeed()
Convars:
shellshock_enabled [SV] – Enables shellshocking, 1 by default shellshock_speedmp [SV] – Speed while shellshocked gets multiplied by this value, 0.25 by default shellshock_duration [SV] – How long shellshock lasts after an explosion, set to 0 to disable, 5 by default shellshock_soundpreference [CL] – 1 for the Call of Duty 2 shellshock end sound, 2 for the Modern Warfare 2 shellshock end sound shellshock_soundvolume [CL] – 0 to mute the sounds, 1 for full volume. Value is a fraction, so it can have decimals
For developers:
ply:SetShellShocked( boolean status ) – Sets the player’s shellshock status ply:GetShellShocked() – Returns the player’s shellshock status Shared HOOK "PlayerShellShocked" arguments ( Player ply, boolean status ) – runs when any player had their shellshock status changed Server HOOK "GetShellShockDuration" arguments ( Player ply, CTakeDamageInfo dmg, boolean took ) – return a number to determine duration of shellshock
Feel free to steal the source code