Raised This Month: $32 Target: $400
 8% 

[L4D & L4D2] Weapons Movement Speed (2.7) [24-Nov-2023]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Plugin ID:
7786
Plugin Version:
2.7
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
    3 
    Plugin Description:
    Sets player speed based on the weapon carried.
    Old 09-09-2021 , 03:18   [L4D & L4D2] Weapons Movement Speed (2.7) [24-Nov-2023]
    Reply With Quote #1

    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.
    Attached Files
    File Type: cfg l4d_weapons_movement_speed.cfg (5.7 KB, 572 views)
    File Type: sp Get Plugin or Get Source (l4d_weapons_movement_speed.sp - 255 views - 18.3 KB)
    __________________

    Last edited by Silvers; 11-24-2023 at 17:39.
    Silvers is offline
    Kid_Bandes
    Member
    Join Date: May 2010
    Old 09-09-2021 , 03:34   Re: [L4D & L4D2] Weapons Movement Speed (1.0) [09-Sep-2021]
    Reply With Quote #2

    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.
    Kid_Bandes is offline
    Silvers
    SourceMod Plugin Approver
    Join Date: Aug 2010
    Location: SpaceX
    Old 09-09-2021 , 04:38   Re: [L4D & L4D2] Weapons Movement Speed (1.0) [09-Sep-2021]
    Reply With Quote #3

    Not something I'll do for this plugin. Also there is already a sprint plugin
    __________________
    Silvers is offline
    noto3
    Member
    Join Date: Jan 2021
    Old 09-09-2021 , 16:36   Re: [L4D & L4D2] Weapons Movement Speed (1.0) [09-Sep-2021]
    Reply With Quote #4

    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
    noto3 is offline
    Maur0
    Senior Member
    Join Date: Aug 2020
    Old 09-09-2021 , 18:46   Re: [L4D & L4D2] Weapons Movement Speed (1.0) [09-Sep-2021]
    Reply With Quote #5

    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!
    Maur0 is offline
    Psyk0tik
    Veteran Member
    Join Date: May 2012
    Location: Homeless
    Old 09-09-2021 , 20:24   Re: [L4D & L4D2] Weapons Movement Speed (1.0) [09-Sep-2021]
    Reply With Quote #6

    Quote:
    Originally Posted by noto3 View Post
    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 View Post
    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).
    __________________
    Psyk0tik is offline
    a2121858
    Member
    Join Date: Sep 2020
    Old 09-10-2021 , 01:38   Re: [L4D & L4D2] Weapons Movement Speed (1.0) [09-Sep-2021]
    Reply With Quote #7

    Mr. Silvers new work.

    I like it.
    a2121858 is offline
    noto3
    Member
    Join Date: Jan 2021
    Old 09-10-2021 , 09:48   Re: [L4D & L4D2] Weapons Movement Speed (1.0) [09-Sep-2021]
    Reply With Quote #8

    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
    noto3 is offline
    Silvers
    SourceMod Plugin Approver
    Join Date: Aug 2010
    Location: SpaceX
    Old 09-10-2021 , 10:27   Re: [L4D & L4D2] Weapons Movement Speed (1.0) [09-Sep-2021]
    Reply With Quote #9

    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.
    __________________

    Last edited by Silvers; 09-10-2021 at 11:35.
    Silvers is offline
    noto3
    Member
    Join Date: Jan 2021
    Old 09-10-2021 , 12:42   Re: [L4D & L4D2] Weapons Movement Speed (1.0) [09-Sep-2021]
    Reply With Quote #10

    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

    Last edited by noto3; 09-10-2021 at 16:24.
    noto3 is offline
    Reply



    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 23:31.


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