View Single Post
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