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

[CS/CZ] Stripping player weapons leaves hasPrimary offset on true #1089

Closed
xPaw opened this issue Jan 31, 2013 · 4 comments
Closed

[CS/CZ] Stripping player weapons leaves hasPrimary offset on true #1089

xPaw opened this issue Jan 31, 2013 · 4 comments

Comments

@xPaw
Copy link

xPaw commented Jan 31, 2013

In CBasePlayer::RemoveAllItems, it should set m_fHasPrimary to false. Without changing this, player won't be able to pickup primary weapons from armoury_entity entity, weaponbox remains working.

@ghost ghost assigned alfred-valve Jan 31, 2013
@alfred-valve
Copy link

Can you provide a way to reproduce this issue (nice clear steps please) so I can confirm any fixes we make.

@ConnorMcLeod
Copy link

It is hard to reproduce without any addon like AmxModX, would require an aim map with armoury_entity on the ground, and a player_weaponstrip entity somewhere in map then you could notice that if you touch the strip entity while carrying a primary weapon, you can't pickup anymore a armoury_entity (works fine with weaponbox entities).

This is about a CBasePlayer private data (BOOL i think, amxx scripter call it m_fHasPrimary) that is checked when a player touch an armoury_entity so in CArmoury::ArmouryTouch, and if that armoury is not an item or a nade.
That private data is set to FALSE in CBasePlayer::DropPlayerItem and in CBasePlayer::DropShield, i don't think anywhere else, so when CBasePlayer::RemoveAllItems is called, CBasePlayerItem::Drop is called for each weapon player is carrying and that private data is not set to 0.

If i find a map that allows to reproduce the bug, will tell you for sure.

@tyftler
Copy link

tyftler commented Feb 14, 2013

How will we notice if it got fixed?

@johndrinkwater
Copy link
Contributor

You follow the link to ValveSoftware/halflife#1 :)

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

No branches or pull requests

5 participants