AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [L4D2] No Reload Animation Fix (1.8) [03-Apr-2024] (https://forums.alliedmods.net/showthread.php?t=333100)

Silvers 06-19-2021 09:04

[L4D2] No Reload Animation Fix (1.8) [03-Apr-2024]
 
11 Attachment(s)
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.8 (03-Apr-2024)
    - Fixed wrong weapons ammo when switch weapons. Thanks to "HarryPotter" for the update.

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.

vikingo12 06-24-2021 09:40

Re: [L4D2] No Reload Animation Fix - Picking Up Same Weapon (1.0) [19-Jun-2021]
 
Love the plugin:)
But on holdout events, the trick still can be done just by picking another gun

Silvers 06-24-2021 12:05

Re: [L4D2] No Reload Animation Fix - Picking Up Same Weapon (1.0) [19-Jun-2021]
 
Quote:

Originally Posted by vikingo12 (Post 2750978)
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.

moschinovac 06-24-2021 12:56

Re: [L4D2] No Reload Animation Fix - Picking Up Same Weapon (1.0) [19-Jun-2021]
 
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...

Silvers 06-24-2021 13:08

Re: [L4D2] No Reload Animation Fix - Picking Up Same Weapon (1.0) [19-Jun-2021]
 
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.

Shao 06-24-2021 17:32

Re: [L4D2] No Reload Animation Fix - Picking Up Same Weapon (1.0) [19-Jun-2021]
 
Quote:

Originally Posted by vikingo12 (Post 2750978)
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.

HarryPotter 06-27-2021 05:58

Re: [L4D2] No Reload Animation Fix - Picking Up Same Weapon (1.0) [19-Jun-2021]
 
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 


Silvers 06-27-2021 08:34

Re: [L4D2] No Reload Animation Fix - Picking Up Same Weapon (1.0) [19-Jun-2021]
 
Quote:

Originally Posted by HarryPotter (Post 2751301)
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.


HarryPotter 07-02-2021 15:46

Re: [L4D2] No Reload Animation Fix - Picking Up Same Weapon (1.1) [27-Jun-2021]
 
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 


Silvers 07-06-2021 09:38

Re: [L4D2] No Reload Animation Fix - Picking Up Same Weapon (1.2) [06-Jul-2021]
 
Quote:

Originally Posted by HarryPotter (Post 2751738)
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.


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

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