Raised This Month: $ Target: $400
 0% 

[L4D & L4D2] Stagger Animation - Gravity Allowed (1.8) [06-Aug-2024]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Plugin ID:
8576
Plugin Version:
1.8
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
Servers with this Plugin:
1 
Plugin Description:
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.
Old 10-25-2023 , 00:39   [L4D & L4D2] Stagger Animation - Gravity Allowed (1.8) [06-Aug-2024]
Reply With Quote #1

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.8 (06-Aug-2024)
    - Reverted changes from the previous plugin update.

1.7 (04-Aug-2024)
    - Attempt to fix players teleporting after staggering. Thanks to "3ipKa" for reporting.

1.6 (17-Jun-2024)
    - Fixed the Charger releasing survivors after pummel. Thanks to "JustMadMan" for reporting.
    - This fix requires updating "Left4DHooks" plugin to version 1.151 or newer.

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:
  1. Left 4 DHooks Direct plugin version 1.139 or newer.
  2. 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!
  1. Download the .smx file and put into your servers \addons\sourcemod\plugins folder.
Attached Files
File Type: smx l4d_stagger_gravity.smx (12.2 KB, 87 views)
File Type: sp Get Plugin or Get Source (l4d_stagger_gravity.sp - 75 views - 20.5 KB)
__________________

Last edited by Silvers; 08-06-2024 at 13:49.
Silvers is offline
chungocanh12
Member
Join Date: Apr 2023
Location: Việt Nam
Old 11-09-2023 , 22:42   Re: [L4D & L4D2] Stagger Animation - Gravity Allowed (1.1) [07-Nov-2023]
Reply With Quote #2

i'm using it in my dedicated and crash my server alot. test around 3 hours.
ex: playgame -> chapter 1 ( play normal) -> complete chapter 1 -> loading next chapter (crash my server).
without your plugin my server play normal and no crash or error.

i'm not good in english, sorry
chungocanh12 is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 11-23-2023 , 05:38   Re: [L4D & L4D2] Stagger Animation - Gravity Allowed (1.2) [23-Nov-2023]
Reply With Quote #3

Code:
1.2 (23-Nov-2023)
    - Fixed the plugin sometimes crashing the server on map change. Thanks to "chungocanh12" for reporting.
__________________
Silvers is offline
chungocanh12
Member
Join Date: Apr 2023
Location: Việt Nam
Old 11-24-2023 , 02:50   Re: [L4D & L4D2] Stagger Animation - Gravity Allowed (1.2) [23-Nov-2023]
Reply With Quote #4

Quote:
Originally Posted by Silvers View Post
Code:
1.2 (23-Nov-2023)
    - Fixed the plugin sometimes crashing the server on map change. Thanks to "chungocanh12" for reporting.
thank mate
chungocanh12 is offline
ProjectSky
AlliedModders Donor
Join Date: Aug 2020
Old 11-24-2023 , 07:47   Re: [L4D & L4D2] Stagger Animation - Gravity Allowed (1.2) [23-Nov-2023]
Reply With Quote #5

stagger distance in the air seem farther than on the ground?
stagger player can still perform action (WASD, attack...)

https://imgur.com/BWI7Mjw

Last edited by ProjectSky; 11-24-2023 at 08:23.
ProjectSky is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 11-24-2023 , 18:34   Re: [L4D & L4D2] Stagger Animation - Gravity Allowed (1.3) [24-Nov-2023]
Reply With Quote #6

Code:
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.
__________________
Silvers is offline
HarryPotter
Veteran Member
Join Date: Sep 2017
Location: Taiwan, Asia
Old 11-26-2023 , 09:30   Re: [L4D & L4D2] Stagger Animation - Gravity Allowed (1.3) [24-Nov-2023]
Reply With Quote #7

Test in l4d1 windows/linux

left4dhooks: 1.39
Stagger Animation - Gravity Allowed: 1.3

PHP Code:
L 11/26/2023 21:28:32: [SMException reportedInvalid Handle 94e00dd6 (error 2). It looks like you've chosen the wrong hook callback signature for your setup and you're trying to access the wrong handle.
L 11/26/2023 21:28:32: [SMBlamingleft4dhooks.smx
L 11
/26/2023 21:28:32: [SMCall stack trace:
L 11/26/2023 21:28:32: [SM]   [0DHookParam.Get
L 11
/26/2023 21:28:32: [SM]   [1Line 2988l4dd\l4dd_forwards.sp::DTR_CTerrorPlayer_OnShovedByPounceLanding
L 11
/26/2023 21:28:32: [SMException reportedInvalid Handle 95b00dd6 (error 2). It looks like you've chosen the wrong hook callback signature for your setup and you're trying to access the wrong handle.
L 11/26/2023 21:28:32: [SMBlamingleft4dhooks.smx
L 11
/26/2023 21:28:32: [SMCall stack trace:
L 11/26/2023 21:28:32: [SM]   [0DHookParam.Get
L 11
/26/2023 21:28:32: [SM]   [1Line 3011l4dd\l4dd_forwards.sp::DTR_CTerrorPlayer_OnShovedByPounceLanding_Post
L 11
/26/2023 21:29:26: [SMException reportedInvalid Handle c4900ac1 (error 2). It looks like you've chosen the wrong hook callback signature for your setup and you're trying to access the wrong handle.
L 11/26/2023 21:29:26: [SMBlamingleft4dhooks.smx
L 11
/26/2023 21:29:26: [SMCall stack trace:
L 11/26/2023 21:29:26: [SM]   [0DHookParam.Get
L 11
/26/2023 21:29:26: [SM]   [1Line 2988l4dd\l4dd_forwards.sp::DTR_CTerrorPlayer_OnShovedByPounceLanding
L 11
/26/2023 21:29:26: [SMException reportedInvalid Handle c4c00dd2 (error 2). It looks like you've chosen the wrong hook callback signature for your setup and you're trying to access the wrong handle.
L 11/26/2023 21:29:26: [SMBlamingleft4dhooks.smx
L 11
/26/2023 21:29:26: [SMCall stack trace:
L 11/26/2023 21:29:26: [SM]   [0DHookParam.Get
L 11
/26/2023 21:29:26: [SM]   [1Line 3011l4dd\l4dd_forwards.sp::DTR_CTerrorPlayer_OnShovedByPounceLanding_Post
L 11
/26/2023 21:29:26: [SMException reportedInvalid Handle c4e00ac1 (error 2). It looks like you've chosen the wrong hook callback signature for your setup and you're trying to access the wrong handle.
L 11/26/2023 21:29:26: [SMBlamingleft4dhooks.smx
L 11
/26/2023 21:29:26: [SMCall stack trace:
L 11/26/2023 21:29:26: [SM]   [0DHookParam.Get
L 11
/26/2023 21:29:26: [SM]   [1Line 2988l4dd\l4dd_forwards.sp::DTR_CTerrorPlayer_OnShovedByPounceLanding
L 11
/26/2023 21:29:26: [SMException reportedInvalid Handle c5b00ac1 (error 2). It looks like you've chosen the wrong hook callback signature for your setup and you're trying to access the wrong handle.
L 11/26/2023 21:29:26: [SMBlamingleft4dhooks.smx
L 11
/26/2023 21:29:26: [SMCall stack trace:
L 11/26/2023 21:29:26: [SM]   [0DHookParam.Get
L 11
/26/2023 21:29:26: [SM]   [1Line 3011l4dd\l4dd_forwards.sp::DTR_CTerrorPlayer_OnShovedByPounceLanding_Post 
__________________

Last edited by HarryPotter; 11-26-2023 at 09:30.
HarryPotter is offline
soda3000
New Member
Join Date: Apr 2023
Location: North America
Old 04-15-2024 , 13:41   Re: [L4D & L4D2] Stagger Animation - Gravity Allowed (1.4) [10-Jan-2024]
Reply With Quote #8

I really like this plugin and the quality of life it brings.

I have noticed some complications while using it for some time now on my server.

FYI - I typically run the server at 100 tick rate.

Some things I noticed:

1. Occasionally chargers will crash into a wall and stumble, and in doing so will move extremely fast in a seemingly random direction, about 10ft or meters away.
- It almost looks like they are teleporting, but I think it's more like the plugin is perhaps trying to align them on the ground and unintentionally increasing their velocity very quickly.
- Sometimes I believe this applies to survivors who are stumbled by the charger as well, when he hits the wall near them.

2. Stumbling off ledge, instead of getting 'ledged'.
- During a stumble animation, if the survivor happens to stumble off of a hang-spot, they will not hang, but rather fall to their death.
- This is quite annoying if it happens to you, since you are not expecting to be fully dead, just ledged.

Besides these couple things, the plugin seems to work exactly as expected.

Please let me know if you want me to get some footage, and I will try to capture these things on video and post here.

Thanks for your work
soda3000 is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 04-16-2024 , 04:17   Re: [L4D & L4D2] Stagger Animation - Gravity Allowed (1.4) [10-Jan-2024]
Reply With Quote #9

Quote:
Originally Posted by soda3000 View Post
I have noticed some complications while using it for some time now on my server.
These issues are most likely because the animation when triggered would push players in a specific direction and expect them to be at a certain position when the animation finishes, but because this plugin interrupts the animation they are in a different position then what the game is expecting so they get teleported. I thought I had fixed these issues, I noticed them when making the plugin. I guess that still happens in specific circumstances.

I hope this is being caused by detecting the wrong animation number, or possibly a missing animation number, which would have to be fixed in Left4DHooks. I'll verify them when I get time.

Otherwise I'm not sure what else I could do, especially for ledge hanging, that whole system looks messy. Does it happen every time you stumble off a ledge? I remember testing and it worked fine, but if that always happens then again I'm not sure what could be done. Edit: tested and it would always cause me to ledge hang.

A short video of this happening in either instance or both could be useful, if you have time and capture it.

Maybe I can send you a debug version of Left4DHooks to log animation numbers, do you have discord? PM me.
__________________

Last edited by Silvers; 04-21-2024 at 13:01.
Silvers is offline
soda3000
New Member
Join Date: Apr 2023
Location: North America
Old 04-25-2024 , 14:28   Re: [L4D & L4D2] Stagger Animation - Gravity Allowed (1.4) [10-Jan-2024]
Reply With Quote #10

Quote:
Originally Posted by Silvers View Post
These issues are most likely because the animation when triggered would push players in a specific direction and expect them to be at a certain position when the animation finishes, but because this plugin interrupts the animation they are in a different position then what the game is expecting so they get teleported. I thought I had fixed these issues, I noticed them when making the plugin. I guess that still happens in specific circumstances.

I hope this is being caused by detecting the wrong animation number, or possibly a missing animation number, which would have to be fixed in Left4DHooks. I'll verify them when I get time.

Otherwise I'm not sure what else I could do, especially for ledge hanging, that whole system looks messy. Does it happen every time you stumble off a ledge? I remember testing and it worked fine, but if that always happens then again I'm not sure what could be done. Edit: tested and it would always cause me to ledge hang.

A short video of this happening in either instance or both could be useful, if you have time and capture it.

Maybe I can send you a debug version of Left4DHooks to log animation numbers, do you have discord? PM me.
Okay not gonna lie, I might have been totally buggin.

I went to go retest thinking I would be able to capture footage to provide, but I wasn't able to replicate either the ledging issue, nor the charger teleport issue...

Not really sure how, but as far as I'm concerned, it seemed to be working perfectly when I retested.
Very strange, considering I was nearly certain nothing changed since I last experienced these issues..

Regardless, apologies!
It appears all is working from what I can tell.

If I notice anything again regarding this plugin, I shall update you!

BTW, I do have discord @xxnoobslayer
I'm an amateur L4D2 plugin dev and spend a lot of time checking out the cool stuff people make for the game
soda3000 is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:12.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode