About:- Allows gravity when players are staggering, otherwise they would float in the air until the animation completes.
- Also allows staggering over a ledge and falling.
- Works for all players.
Thanks:- ForgeTest - For the idea, helping with code and testing.
Cvars:
Saved to
l4d_stagger_gravity.cfg in your servers
\cfg\sourcemod\ folder.
PHP Code:
// Allow staggering when in the air for these types: 1=Survivors, 2=Smoker, 4=Boomer, 8=Hunter, 16=Spitter, 32=Jockey, 64=Charger, 128=Tank, 255=All.
l4d_stagger_gravity_air "255"
// 0=Plugin off, 1=Plugin on.
l4d_stagger_gravity_allow "1"
// Turn on the plugin in these game modes, separate by commas (no spaces). (Empty = all).
l4d_stagger_gravity_modes ""
// Turn off the plugin in these game modes, separate by commas (no spaces). (Empty = none).
l4d_stagger_gravity_modes_off ""
// Turn on the plugin in these game modes. 0=All, 1=Coop, 2=Survival, 4=Versus, 8=Scavenge. Add numbers together.
l4d_stagger_gravity_modes_tog "0"
// When using the command should players: 1=Stagger backwards. 2=Stagger forwards. 3=Stagger in random direction.
l4d_stagger_gravity_cmd "1"
// Stop staggering after falling off a ledge for these types: 1=Survivors, 2=Smoker, 4=Boomer, 8=Hunter, 16=Spitter, 32=Jockey, 64=Charger, 128=Tank, 255=All.
l4d_stagger_gravity_stop "0"
// Enable gravity when staggering for these types: 1=Survivors, 2=Smoker, 4=Boomer, 8=Hunter, 16=Spitter, 32=Jockey, 64=Charger, 128=Tank, 255=All.
l4d_stagger_gravity_type "255"
// Plugin version
l4d_stagger_gravity_version
Changes:
Code:
1.5 (30-Apr-2024)
- Fixed not resetting a variable which could cause subsequent staggers to not be blocked.
1.4 (10-Jan-2024)
- Changed the plugins on/off/mode cvars to use the "Left 4 DHooks" method instead of creating an entity.
1.3 (24-Nov-2023)
- Changes to prevent shoving and shooting/shoving/moving whilst stumbling. Thanks to "ProjectSky" for reporting.
- Fixed possibly creating the "info_gamemode" entity before map start, depending on cvars.
- Fixed unhook event errors when turning the plugin off.
1.2 (23-Nov-2023)
- Fixed the plugin sometimes crashing the server on map change. Thanks to "chungocanh12" for reporting.
1.1 (07-Nov-2023)
- Changed method of getting stagger duration. Reading memory was from the old test version, better to use GetEntDataFloat.
1.0 (25-Oct-2023)
- Initial release.
0.1 (08-Dec-2022)
- Initial creation.
Requirements:- Left 4 DHooks Direct plugin version 1.139 or newer.
- SourceMod version 1.11 or newer.
Installation:DO NOT click 'Get Plugin' or it will fail to compile because this plugin requires Left 4 DHooks Direct!
- Download the .smx file and put into your servers \addons\sourcemod\plugins folder.