Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with ammo on dropped weapons #520

Closed
tarsisd2 opened this issue Mar 14, 2020 · 10 comments · Fixed by #840
Closed

Problem with ammo on dropped weapons #520

tarsisd2 opened this issue Mar 14, 2020 · 10 comments · Fixed by #840

Comments

@tarsisd2
Copy link

tarsisd2 commented Mar 14, 2020

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 tarsisd2 changed the title Problem with ammo on droped weapons Problem with ammo on dropped weapons Mar 14, 2020
@fl0werD
Copy link
Contributor

fl0werD commented Mar 14, 2020

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

@s1lentq
Copy link
Collaborator

s1lentq commented Mar 14, 2020

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.

@tarsisd2
Copy link
Author

tarsisd2 commented Mar 14, 2020

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?

@fant1kua
Copy link
Contributor

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

@RauliTop
Copy link
Contributor

RauliTop commented Mar 20, 2020

Well, it's not related to mp_refill_bpammo_weapons. OK

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

@dystopm
Copy link
Contributor

dystopm commented Mar 26, 2020

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

@RauliTop
Copy link
Contributor

RauliTop commented Mar 27, 2020

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

@tarsisd2
Copy link
Author

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

@dystopm
Copy link
Contributor

dystopm commented Mar 27, 2020

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

@scripting6
Copy link

?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants