AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [L4D & L4D2] Weapons Movement Speed (2.7) [24-Nov-2023] (https://forums.alliedmods.net/showthread.php?t=334240)

Silvers 09-09-2021 03:18

[L4D & L4D2] Weapons Movement Speed (2.7) [24-Nov-2023]
 
12 Attachment(s)
About:
  • Set the Run, Walk and Crouch speed while carrying different weapons.
  • Requested by "noto3".



CVars:

Saved to l4d_weapons_movement_speed.cfg in your servers \left4dead\cfg\sourcemod\ folder.

PHP Code:

// 0=Plugin off, 1=Plugin on.
l4d_weapons_movement_speed_allow "1"

// Turn on the plugin in these game modes, separate by commas (no spaces). (Empty = all).
l4d_weapons_movement_speed_modes ""

// Turn off the plugin in these game modes, separate by commas (no spaces). (Empty = none).
l4d_weapons_movement_speed_modes_off ""

// Turn on the plugin in these game modes. 0=All, 1=Coop, 2=Survival, 4=Versus, 8=Scavenge. Add numbers together.
l4d_weapons_movement_speed_modes_tog "0"

// Weapons Movement Speed plugin version.
l4d_weapons_movement_speed_version 



Changes:
Code:

2.7 (24-Nov-2023)
    - Fixed movement speed bug after staggering when the stagger timer didn't reset (due to some plugins such as "Stagger Gravity").

2.6 (10-Feb-2023)
    - Fixed not hooking the "pain_pills_decay_rate" and "survivor_limp_health" cvar changes.
    - Minor changes to fix compatibility with the "Lagged Movement" plugin.

2.5 (26-Nov-2022)
    - Fixed fix property not found errors.
    - Plugin now resets speed to default on plugin end.

2.4 (12-Nov-2022)
    - Fixed the Run and Walk speeds being inverted.
    - Now optionally uses the "Lagged Movement" plugin by "Silvers" to prevent conflicts when multiple plugins try to set player speed:
    - https://forums.alliedmods.net/showthread.php?t=340345

2.3 (10-Nov-2022)
    - Fixed setting the wrong velocity when jumping. Thanks to "Maur0" for reporting.

2.2 (08-Nov-2022)
    - Fixed the players velocity resetting to default when jumping or staggering. Thanks to "Eärendil" for reporting.

2.1 (03-Nov-2022)
    - Fixed client not connected errors. Thanks to "sonic155" for reporting.

2.0 (02-Nov-2022)
    - Removed Left4DHooks plugin requirement.
    - Added "hurt" key to the config to consider the survivors limp health.
    - Added melee weapons support. Also supports all 3rd party melee weapons using their script name.
    - Changed the method of setting player speed.
    - Config default values are "0.0" now.
    - Fixed jumping or staggering movement speed bug.
    - Fixed affecting Special Infected ghosts.

1.0 (09-Sep-2021)
    - Initial release.



Installation:
  1. Click "Get Plugin" and put the .smx file into your servers \addons\sourcemod\plugins\ folder.
  2. Download the .cfg file and put into your servers \addons\sourcemod\data\ folder.
  3. Recommend viewing and installing the Lagged Movement plugin if required to prevent plugin conflicts.

Kid_Bandes 09-09-2021 03:34

Re: [L4D & L4D2] Weapons Movement Speed (1.0) [09-Sep-2021]
 
Nice one, I got an idea, can you make something like Stamina, W will act as SHIFT, and SHIFT will act as W but consume stamina.

Silvers 09-09-2021 04:38

Re: [L4D & L4D2] Weapons Movement Speed (1.0) [09-Sep-2021]
 
Not something I'll do for this plugin. Also there is already a sprint plugin

noto3 09-09-2021 16:36

Re: [L4D & L4D2] Weapons Movement Speed (1.0) [09-Sep-2021]
 
movement after changes feel a little weird. It's like being dragged behind rather than actually get slowed down. There is a "dragging" feeling on movements slowed down in config

Maur0 09-09-2021 18:46

Re: [L4D & L4D2] Weapons Movement Speed (1.0) [09-Sep-2021]
 
I loved. The best plugin you have ever made. Well done.

Something that if, as notedo3 said, it is strange to feel when you change the speed in different weapons or items, but if you want to change the walk for running as if it were in modern first person shooter.

Something that I would like to add (if possible) is that when your health is very low depending on the command "survivor_limp_health 40", which would be 39 and below. Your speed slows down, and instead doesn't change. Over there if you can Silvers, to add some command that allows you to change the speed to change when your health is very low, it depends on the value that you put according to the "survivor_limp_health" command.

Type like this:
"run" = "220.0"
"walk" = "85.0"
"crouch" = "75.0"
"hurt" = "150.0"

The "hurt" works when your health is at 39 and below, it depends as I said before the command "survivor_limp_health" which by default is at 40. Then your speed changes depending on your health.

I hope I have not complicated what I said and I do not know if I was able to express my answer well. Anyway, thanks for this great plugin! :D :up:

Psyk0tik 09-09-2021 20:24

Re: [L4D & L4D2] Weapons Movement Speed (1.0) [09-Sep-2021]
 
Quote:

Originally Posted by noto3 (Post 2757358)
movement after changes feel a little weird. It's like being dragged behind rather than actually get slowed down. There is a "dragging" feeling on movements slowed down in config

Quote:

Originally Posted by Maur0 (Post 2757364)
Something that if, as notedo3 said, it is strange to feel when you change the speed in different weapons or items, but if you want to change the walk for running as if it were in modern first person shooter.

This is due to client desync, which might not be easy to fix with a plugin. That's why most plugins that change player speed use the "m_flLaggedMovementValue" netprop method instead. The issue with that method though is that it affects player gravity as well (i.e. faster speed = higher gravity).

a2121858 09-10-2021 01:38

Re: [L4D & L4D2] Weapons Movement Speed (1.0) [09-Sep-2021]
 
Mr. Silvers new work.

I like it.:)

noto3 09-10-2021 09:48

Re: [L4D & L4D2] Weapons Movement Speed (1.0) [09-Sep-2021]
 
This plugin has a "sm_speedplayer" option, when changed, it changes player's gravity accordingly as @Psyk0tik mentioned and without any "drag" feeling. It feels smoother as well. @Silvers, i thought this might help you updating this plugin to make it smoother

Silvers 09-10-2021 10:27

Re: [L4D & L4D2] Weapons Movement Speed (1.0) [09-Sep-2021]
 
I'll change this shortly, and make it consider limp health. I wanted to test the left4dhooks forwards but I guess they're not good for this. Back to "m_flLaggedMovementValue" then.

Edit: What about changing "m_flMaxspeed"? I do this in Anti-Rush plugin... - Causes stutter also. Maybe I'll have to change Anti-Rush plugin.

Edit2: Any solution on solving gravity change? Maybe SetClientGravity like "m_flLaggedMovementValue" value. 1 * new "m_flLaggedMovementValue" value sort of works but it's still too great.

noto3 09-10-2021 12:42

Re: [L4D & L4D2] Weapons Movement Speed (1.0) [09-Sep-2021]
 
Note: The config changes the speed for "injured" state - less than 40hp and 1hp speed as well. Might wanna add a cvar to default injured state speeds or an option in the config

edit: also other factors that effects speed such as adrenaline boost


All times are GMT -4. The time now is 10:07.

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