Skip to content

Refactored RemovePlayerItemEx and Extended DestroyItem in CBasePlayerItem#864

Merged
s1lentq merged 3 commits intorehlds:masterfrom
Javekson:optimization/code-structure-improvements
Sep 28, 2023
Merged

Refactored RemovePlayerItemEx and Extended DestroyItem in CBasePlayerItem#864
s1lentq merged 3 commits intorehlds:masterfrom
Javekson:optimization/code-structure-improvements

Conversation

@Javekson
Copy link
Contributor

Extension of the DestroyItem method for the CBasePlayerItem class

  • Added a boolean value to indicate the success of item deletion
  • Implemented a condition for handling WEAPON_C4 specifically
  • Added a condition to check for the presence of primary weapons

Updated the item removal mechanism in the RemovePlayerItemEx method

  • Fixed a double hook invocation issue for grenades and performed minor code refactoring

Fix duplicate remove of item_thighpack

- Added a boolean value to indicate the success of item deletion

- Implemented a condition for handling WEAPON_C4 specifically

- Added a condition to check for the presence of primary weapons
- Fixed a double hook invocation issue for grenades and performed minor code refactoring
@hajimura
Copy link
Contributor

Nice catch!

@s1lentq s1lentq merged commit d7b4409 into rehlds:master Sep 28, 2023
@Javekson Javekson deleted the optimization/code-structure-improvements branch October 3, 2023 08:50
yohimik pushed a commit to yohimik/ReGameDLL_CS that referenced this pull request Jun 5, 2025
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 this pull request may close these issues.

3 participants