API: CSPlayerWeapon integration + new members and functions#850
Merged
s1lentq merged 5 commits intorehlds:masterfrom Aug 23, 2023
Merged
API: CSPlayerWeapon integration + new members and functions#850s1lentq merged 5 commits intorehlds:masterfrom
API: CSPlayerWeapon integration + new members and functions#850s1lentq merged 5 commits intorehlds:masterfrom
Conversation
s1lentq
reviewed
Jul 17, 2023
- Member name changed to m_iStateSecondaryAttack - Member type changed to uint8_t which has same size of bool but allows more values than true or false (this wont break API compatibility) - Moved logic inside HasSecondaryAttack to correctly alter function return based on m_iStateSecondaryAttack, which can be (0) no value / null (1) set (2) block -Removed logic in CBasePlayerWeapon::Spawn that caches the return value of HasSecondaryAttack, as this can only be overridden when set, rather than always
Undone indents in switch
s1lentq
approved these changes
Jul 18, 2023
yohimik
pushed a commit
to yohimik/ReGameDLL_CS
that referenced
this pull request
Jun 5, 2025
…#850) - Member name changed to m_iStateSecondaryAttack - Member type changed to uint8_t which has same size of bool but allows more values than true or false (this wont break API compatibility) - Moved logic inside HasSecondaryAttack to correctly alter function return based on m_iStateSecondaryAttack, which can be (0) no value / null (1) set (2) block -Removed logic in CBasePlayerWeapon::Spawn that caches the return value of HasSecondaryAttack, as this can only be overridden when set, rather than always * Improve API compatibility
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
m_bHasSecondaryAttackmember refactory:m_iStateSecondaryAttackuint8_twhich has same size ofboolbut allows more values than true or false (this wont break API compatibility)CBasePlayerWeapon::HasSecondaryAttackto correctly alter function return based onm_iStateSecondaryAttack, which can be (0) no value / null (1) set (2) blockCBasePlayerWeapon::Spawnthat caches the return value ofCBasePlayerWeapon::HasSecondaryAttack, as this can only be overridden when set, rather than alwaysCSPlayerWeaponmethod:DefaultDeployDefaultReloadDefaultShotgunReloadKickBackSendWeaponAnim