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

Player RawWeapons + Weapons are probably kinda broken #31

Closed
markus-wa opened this issue Jul 5, 2018 · 2 comments
Closed

Player RawWeapons + Weapons are probably kinda broken #31

markus-wa opened this issue Jul 5, 2018 · 2 comments

Comments

@markus-wa
Copy link
Owner

markus-wa commented Jul 5, 2018

cache[i2] = 0

if !isSpecialWeapon && attacker != nil && len(attacker.Weapons) > 0 {

This doesn't make any sense.

Player.Weapons is never set and some code for the RawWeapons is never run because cache[i2] is always 0, that can't be right.
https://codecov.io/gh/markus-wa/demoinfocs-golang/src/master/datatables.go#L260

@markus-wa markus-wa changed the title Player RawWeapons is probably kinda broken Player RawWeapons + Weapons are probably kinda broken Jul 5, 2018
@micvbang
Copy link
Contributor

micvbang commented Jul 5, 2018

Yep, agreed. Especially the code in datatables makes no sense.

markus-wa added a commit that referenced this issue Jul 5, 2018
markus-wa added a commit that referenced this issue Jul 5, 2018
@markus-wa
Copy link
Owner Author

Fixed according to #30 (comment)

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

2 participants