Raised This Month: $12 Target: $400
 3% 

[L4D2] No Reload Animation Fix (1.7) [12-Mar-2024]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Plugin ID:
7692
Plugin Version:
1.7
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
    47 
    Plugin Description:
    Prevent filling the clip and skipping the reload animation when taking the same weapon.
    Old 06-19-2021 , 09:04   [L4D2] No Reload Animation Fix (1.7) [12-Mar-2024]
    Reply With Quote #1

    About:
    • Fixes picking up a weapon of the same type and refilling the clip size to full.
    • Returns the clip size to the previous value and adds the new ammo to the reserve.


    Thanks:
    • Eärendil - For the idea and request



    Related Plugins:



    ConVars:

    Saved to l4d2_reload_fix.cfg in your servers \cfg\sourcemod\ folder.

    PHP Code:
    // When using the give command and replacing the same weapon type, transfer ammo to the new weapon. 0=No. 1=Yes.
    l4d2_reload_fix_give "0"

    // No Reload Animation Fix plugin version
    l4d2_reload_fix_version 


    Changes:
    Code:
    1.7 (12-Mar-2024)
        - Save all clients weapons ammo, useful if weapon ammo exceeded the official ammo cvar. Thanks to "HarryPotter" for the update.
    
    1.6 (25-May-2023)
        - Added cvar "l4d2_reload_fix_give" to optionally prevent "give" command with same type of weapon setting to the previous weapons ammo.
    
    1.5 (20-Aug-2022)
        - Records all weapons clip and ammo. Thanks to "HarryPotter" for writing.
    
    1.4 (29-Mar-2022)
        - Fixed not always detecting the correct current weapon. Thanks to "Forgetest" for fixing.
    
    1.3 (02-Nov-2021)
        - Fixed treating different weapon skins as the same weapon. Thanks to "tRololo312312" for reporting.
    
    1.2 (06-Jul-2021)
        - Fixed throwing errors about invalid entity. Thanks to "HarryPotter" for reporting.
    
    1.1 (27-Jun-2021)
        - Fixed throwing errors about invalid entity. Thanks to "HarryPotter" for reporting.
    
    1.0 (19-Jun-2021)
        - Initial release.


    Installation:
    1. Click "Get Plugin" and put the .smx file into your servers \addons\sourcemod\plugins\ folder.
    Attached Files
    File Type: sp Get Plugin or Get Source (l4d2_reload_fix.sp - 46 views - 13.1 KB)
    __________________

    Last edited by Silvers; 03-12-2024 at 05:58.
    Silvers is offline
    vikingo12
    Member
    Join Date: Nov 2018
    Old 06-24-2021 , 09:40   Re: [L4D2] No Reload Animation Fix - Picking Up Same Weapon (1.0) [19-Jun-2021]
    Reply With Quote #2

    Love the plugin
    But on holdout events, the trick still can be done just by picking another gun
    vikingo12 is offline
    Silvers
    SourceMod Plugin Approver
    Join Date: Aug 2010
    Location: SpaceX
    Old 06-24-2021 , 12:05   Re: [L4D2] No Reload Animation Fix - Picking Up Same Weapon (1.0) [19-Jun-2021]
    Reply With Quote #3

    Quote:
    Originally Posted by vikingo12 View Post
    Love the plugin
    But on holdout events, the trick still can be done just by picking another gun
    Can you please explain more in detail how to do this? When picking up a weapon of the same type from a weapon spawner that's what the plugin fixes resetting the clip size. So it acts like they're simply picking up ammo from an ammo pile.
    __________________
    Silvers is offline
    moschinovac
    Member
    Join Date: Mar 2019
    Location: Vietnam
    Old 06-24-2021 , 12:56   Re: [L4D2] No Reload Animation Fix - Picking Up Same Weapon (1.0) [19-Jun-2021]
    Reply With Quote #4

    He mean if theres 2 different guns on ground and one gun is same as the gun u r holding. U still can do the trick by pick up different gun then pick up the other gun same as the gun u used. I guess...

    Last edited by moschinovac; 06-24-2021 at 12:59.
    moschinovac is offline
    Silvers
    SourceMod Plugin Approver
    Join Date: Aug 2010
    Location: SpaceX
    Old 06-24-2021 , 13:08   Re: [L4D2] No Reload Animation Fix - Picking Up Same Weapon (1.0) [19-Jun-2021]
    Reply With Quote #5

    But they are 2 different weapons and will have 2 different clips, which is expected to not have to reload. Or you mean 2 different spawner weapon types pick up one, it swallows the old, then pickup the other which is the same as the last you just had? Well that gets more complicated with timing, how long should you be allowed before you can take a weapon of the same type you just had X seconds ago etc etc. I guess you would store the classname of every weapon for every client and the time they last held that weapon, then prevent or reset to old ammo value. It's not something I'm really interested in doing, sounds tedious and boring to write. I might do but this is not on the priority list.
    __________________

    Last edited by Silvers; 06-24-2021 at 13:08.
    Silvers is offline
    Shao
    Senior Member
    Join Date: Jan 2015
    Old 06-24-2021 , 17:32   Re: [L4D2] No Reload Animation Fix - Picking Up Same Weapon (1.0) [19-Jun-2021]
    Reply With Quote #6

    Quote:
    Originally Posted by vikingo12 View Post
    Love the plugin
    But on holdout events, the trick still can be done just by picking another gun
    If that happens to be a problem, using single weapon spawns will fix that issue.

    What the plugin achieve here is rather niche but an extremely sweet detail to add up on.
    Shao is offline
    HarryPotter
    Veteran Member
    Join Date: Sep 2017
    Location: Taiwan, Asia
    Old 06-27-2021 , 05:58   Re: [L4D2] No Reload Animation Fix - Picking Up Same Weapon (1.0) [19-Jun-2021]
    Reply With Quote #7

    PHP Code:
    L 06/27/2021 17:42:20: [SMException reportedEntity -(-1is invalid
    L 06
    /27/2021 17:42:20: [SMBlamingl4d2_reload_fix.smx
    L 06
    /27/2021 17:42:20: [SMCall stack trace:
    L 06/27/2021 17:42:20: [SM]   [0GetEntProp
    L 06
    /27/2021 17:42:20: [SM]   [1Line 159l4d2_reload_fix.sp::OnFrame 
    __________________
    HarryPotter is offline
    Silvers
    SourceMod Plugin Approver
    Join Date: Aug 2010
    Location: SpaceX
    Old 06-27-2021 , 08:34   Re: [L4D2] No Reload Animation Fix - Picking Up Same Weapon (1.0) [19-Jun-2021]
    Reply With Quote #8

    Quote:
    Originally Posted by HarryPotter View Post
    PHP Code:
    L 06/27/2021 17:42:20: [SMException reportedEntity -(-1is invalid
    L 06
    /27/2021 17:42:20: [SMBlamingl4d2_reload_fix.smx
    L 06
    /27/2021 17:42:20: [SMCall stack trace:
    L 06/27/2021 17:42:20: [SM]   [0GetEntProp
    L 06
    /27/2021 17:42:20: [SM]   [1Line 159l4d2_reload_fix.sp::OnFrame 
    Thanks, I knew I should have added a check. Someone can lose their weapon in 1 frame!

    Code:
    1.1 (27-Jun-2021)
        - Fixed throwing errors about invalid entity. Thanks to "HarryPotter" for reporting.
    __________________
    Silvers is offline
    HarryPotter
    Veteran Member
    Join Date: Sep 2017
    Location: Taiwan, Asia
    Old 07-02-2021 , 15:46   Re: [L4D2] No Reload Animation Fix - Picking Up Same Weapon (1.1) [27-Jun-2021]
    Reply With Quote #9

    PHP Code:
    L 07/02/2021 23:36:24: [SMException reportedInvalid edict (-- -1)
    L 07/02/2021 23:36:24: [SMBlamingl4d2_reload_fix.smx
    L 07
    /02/2021 23:36:24: [SMCall stack trace:
    L 07/02/2021 23:36:24: [SM]   [0GetEdictClassname
    L 07
    /02/2021 23:36:24: [SM]   [1Line 140l4d2_reload_fix.sp::WeaponCanUse 
    __________________
    HarryPotter is offline
    Silvers
    SourceMod Plugin Approver
    Join Date: Aug 2010
    Location: SpaceX
    Old 07-06-2021 , 09:38   Re: [L4D2] No Reload Animation Fix - Picking Up Same Weapon (1.2) [06-Jul-2021]
    Reply With Quote #10

    Quote:
    Originally Posted by HarryPotter View Post
    PHP Code:
    L 07/02/2021 23:36:24: [SMException reportedInvalid edict (-- -1)
    L 07/02/2021 23:36:24: [SMBlamingl4d2_reload_fix.smx
    L 07
    /02/2021 23:36:24: [SMCall stack trace:
    L 07/02/2021 23:36:24: [SM]   [0GetEdictClassname
    L 07
    /02/2021 23:36:24: [SM]   [1Line 140l4d2_reload_fix.sp::WeaponCanUse 
    Code:
    1.2 (06-Jul-2021)
        - Fixed throwing errors about invalid entity. Thanks to "HarryPotter" for reporting.
    Thanks, fixed.
    __________________
    Silvers 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 11:54.


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