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

Misleading comment that networked entityState_t weapon bits must be at least 8 #327

Open
zturtleman opened this issue Jan 27, 2022 · 0 comments
Labels

Comments

@zturtleman
Copy link
Owner

The commit ed75b3ce3 adds a comment "// because 'weapon' is used for things besides weaponnum it must be minimum of 8 bits" however I don't see entityState_t weapon being used for anything besides weaponnum.

I may of mis-remembered weapon as being used for other things like modelindex, modelindex2, and probably some other fields are and I didn't want to reduce weapon to less than 8 bits.

I won't be changing the code at this point—to drop the hard coded 8 bit minimum to WEAPONNUM_BITS (4)—as it would needlessly break network compatibility. (Technically, I think it's possible to support multiple netfields based on CS_GAME_PROTOCOL but this isn't worth it.)

Reported by gbbofh on Discord.

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

No branches or pull requests

1 participant