ReGameDLL_CS icon indicating copy to clipboard operation
ReGameDLL_CS copied to clipboard

Problem with ammo on dropped weapons

Open tarsisd2 opened this issue 4 years ago • 9 comments

I set on my servers that every weapon will get full ammo on buy or on spawn with the cvar mp_refill_bpammo_weapons 2, but if someone buys a weapon, lets say a ak-47 he will have 30/90 bullets and he drop it and i pick it up, i will only have 30/0 and if i try to buy ammo it will say that its now allowed to buy, can be add to fill ammo on dropped weapons too? Or at least allow to buy ammo for dropped weapons, because it does not work, if needed i can record a vídeo and send it too

tarsisd2 avatar Mar 14 '20 11:03 tarsisd2

Do you want unlimited bpammo or "fix"? There is mp_infinite_ammo 2.

fl0werD avatar Mar 14 '20 16:03 fl0werD

This expected behavior, dropped weapon is actually a weaponbox and doesn't pack ammo by default that the player bought or got by CVar mp_refill_bpammo_weapons, but the game still can to pack ammo for dropped weapon if it have one property ITEM_FLAG_EXHAUSTIBLE https://github.com/s1lentq/ReGameDLL_CS/blob/23172c08559156548aa0173e11b98604d4d3bdb5/regamedll/dlls/player.cpp#L7863-L7876

In conclusion, CVar mp_refill_bpammo_weapons isn't refer to this the behavior because it can reproduced without CVar.

s1lentq avatar Mar 14 '20 16:03 s1lentq

This has nothing to do with infinit ammo

Let me explain better, me and you are playing in the same team but you have money and i dont, you buy a weapon ak-47, you have full ammo 30/90, you drop it to me, i will pick it up and it will have 30/0 only, so far ok, but i can't buy ammo for the picked up weapon, it says its not allowed, and its buytime, if i buy a weapon, ill shoot and i can by more ammo, but you can't buy ammo for a picked up weapon in the same round, only on nextround, even if buytime still active, do you get me?

tarsisd2 avatar Mar 14 '20 18:03 tarsisd2

It's not related to mp_refill_bpammo_weapons CVar. As @s1lentq said before, dropped weapon is weaponbox.

fant1kua avatar Mar 14 '20 19:03 fant1kua

Well, it's not related to mp_refill_bpammo_weapons. OK

But maybe the 'weaponbox' can be fixed, because is causing an undesired situation.

RauliTop avatar Mar 20 '20 17:03 RauliTop

The issue he's mentioning is:

if i try to buy ammo it will say that its now allowed to buy

If you drop an ak47 with 30/90 clip/bpammo, and other player picks it, clip will be 30 and bpammo will be 0 (edited), that's intented by default on CS because ammo is associated to the player itself (m_rgAmmo from CBasePlayer)

But the bug he's telling is, if you're on buytime and somebody gives you the ak47 mentioned, you wont be able to fill bpammo, showing you it is not allowed

dystopm avatar Mar 26 '20 22:03 dystopm

If you drop an ak47 with 30/90 clip/bpammo, and other player picks it, clip will be 30 and bpammo will be 90, that's intented by default on CS because ammo is associated to the player itself (m_rgAmmo from CBasePlayer)

bpammo on picked weapon will be 0, not 90.

But the bug he's telling is, if you're on buytime and somebody gives you the ak47 mentioned, you wont be able to fill bpammo, showing you it is not allowed

Really agree. But I haven't test it. So, I don't know if is happening

RauliTop avatar Mar 27 '20 10:03 RauliTop

This is happening for a long time, in previous versions and new too, i have a few servers full with players, and i have a lot of complaints about this, people can't buy ammo on buytime for the weapon they picked up, i will make a video

tarsisd2 avatar Mar 27 '20 11:03 tarsisd2

If you drop an ak47 with 30/90 clip/bpammo, and other player picks it, clip will be 30 and bpammo will be 90, that's intented by default on CS because ammo is associated to the player itself (m_rgAmmo from CBasePlayer)

bpammo on picked weapon will be 0, not 90.

But the bug he's telling is, if you're on buytime and somebody gives you the ak47 mentioned, you wont be able to fill bpammo, showing you it is not allowed

Really agree. But I haven't test it. So, I don't know if is happening

Mistake, fixd

dystopm avatar Mar 27 '20 18:03 dystopm

?

scripting6 avatar Apr 06 '23 13:04 scripting6