Raised This Month: $ Target: $400
 0% 

[L4D2] No Reload Animation Fix (1.8) [03-Apr-2024]


Post New Thread Reply   
 
Thread Tools Display Modes
vikingo12
Member
Join Date: Nov 2018
Old 03-29-2022 , 09:04   Re: [L4D2] No Reload Animation Fix - Picking Up Same Weapon (1.2) [06-Jul-2021]
Reply With Quote #21

Quote:
Originally Posted by Forgetest View Post
PHP Code:
        int current GetPlayerWeaponSlot(client0);//GetEntPropEnt(client, Prop_Send, "m_hActiveWeapon"); 
Maybe this can fix the issue, as long as only primary weapons to work on.
FIXED!
vikingo12 is offline
HarryPotter
Veteran Member
Join Date: Sep 2017
Location: Taiwan, Asia
Old 03-29-2022 , 12:02   Re: [L4D2] No Reload Animation Fix - Picking Up Same Weapon (1.2) [06-Jul-2021]
Reply With Quote #22

Quote:
Originally Posted by Silvers View Post
Can anyone else confirm this happening? When I reload and switch weapon, then switch back it stays at 0 ammo. Maybe some mod your client/server is using causing this? Because I can't replicate the issue it's difficult to test any potential fix.

I've sent you a PM with a new version if you could test please. Thanks.
I can confirm this bug.
Change the current weapon to pistol or other slot, and then take same smg on the ground => full clip
Code modified by Forgetest can fix this.

PHP Code:
int current GetPlayerWeaponSlot(client0); 

Quote:
Originally Posted by Silvers View Post
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.
I try to save all weapons and clips for each client in l4d1 cuz there only 5 weapons.
Well, it works prefect for me.
My code is provided, you can have a look.
__________________

Last edited by HarryPotter; 03-29-2022 at 12:14.
HarryPotter is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 03-29-2022 , 12:30   Re: [L4D2] No Reload Animation Fix (1.4) [29-Mar-2022]
Reply With Quote #23

Quote:
Originally Posted by HarryPotter View Post
I try to save all weapons and clips for each client in l4d1 cuz there only 5 weapons.
This bug affects L4D1 also? I never noticed it and couldn't replicate.



Code:
1.4 (29-Mar-2022)
    - Fixed not always detecting the correct current weapon. Thanks to "Forgetest" for fixing.
__________________

Last edited by Silvers; 03-29-2022 at 12:32.
Silvers is offline
JLmelenchon
Senior Member
Join Date: Mar 2019
Old 08-17-2022 , 12:45   Re: [L4D2] No Reload Animation Fix (1.4) [29-Mar-2022]
Reply With Quote #24

There is a bug, sometimes you will still be able to skip the reload animation despite taking the same weapon.
JLmelenchon is offline
HarryPotter
Veteran Member
Join Date: Sep 2017
Location: Taiwan, Asia
Old 08-17-2022 , 21:11   Re: [L4D2] No Reload Animation Fix (1.4) [29-Mar-2022]
Reply With Quote #25

Quote:
Originally Posted by JLmelenchon View Post
There is a bug, sometimes you will still be able to skip the reload animation despite taking the same weapon.
Probably pick up different skin weapon?
__________________

Last edited by HarryPotter; 08-17-2022 at 21:12.
HarryPotter is offline
JLmelenchon
Senior Member
Join Date: Mar 2019
Old 08-18-2022 , 00:28   Re: [L4D2] No Reload Animation Fix (1.4) [29-Mar-2022]
Reply With Quote #26

Quote:
Originally Posted by HarryPotter View Post
Probably pick up different skin weapon?
No the same but it does not happen consistently.

Also if you have a uzi empty then switch to shotgun and reswitch to uzi you skip the reload, it's a little faster than reloading.
JLmelenchon is offline
HarryPotter
Veteran Member
Join Date: Sep 2017
Location: Taiwan, Asia
Old 08-18-2022 , 01:33   Re: [L4D2] No Reload Animation Fix (1.4) [29-Mar-2022]
Reply With Quote #27

Quote:
Originally Posted by JLmelenchon View Post
Also if you have a uzi empty then switch to shotgun and reswitch to uzi you skip the reload, it's a little faster than reloading.
I make some changes to prevent that, you can try mine.

Edit: Thanks, added plugin update to first post! -Silvers
__________________

Last edited by Silvers; 08-20-2022 at 10:59. Reason: Added plugin to first post.
HarryPotter is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 05-25-2023 , 03:47   Re: [L4D2] No Reload Animation Fix (1.6) [25-May-2023]
Reply With Quote #28

Code:
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.
__________________
Silvers is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 03-12-2024 , 05:59   Re: [L4D2] No Reload Animation Fix (1.7) [12-Mar-2024]
Reply With Quote #29

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.
__________________
Silvers is offline
chungocanh12
Member
Join Date: Apr 2023
Location: Việt Nam
Old 04-30-2024 , 16:03   Re: [L4D2] No Reload Animation Fix (1.8) [03-Apr-2024]
Reply With Quote #30

I have bug with ammo gun. I’m using ak47 and pick another ak47 it swap to and refill max ammo, but if i’m shoting current ak47 ( 40/500 to 40/450) and pick other ak47 in ground my gun swap that and have max ammo to 40/500. I’m drop current gun and pick my old ak47 and i have bug my ak ammo is 40/500 same witch new ak47. I’m testing shot and drop two gun but 2 gun alway have same ammo reserve

Last edited by chungocanh12; 05-01-2024 at 00:18.
chungocanh12 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 16:19.


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