Skip to content

DHooks: Allow setting CBaseEntity* param to NULL #1751#1754

Merged
peace-maker merged 2 commits intomasterfrom
dhooks-setparam-nullentity
Apr 20, 2022
Merged

DHooks: Allow setting CBaseEntity* param to NULL #1751#1754
peace-maker merged 2 commits intomasterfrom
dhooks-setparam-nullentity

Conversation

@peace-maker
Copy link
Member

The param had to be a valid entity and wasn't allowed to be set to NULL. Behave similar to SetReturn which maps INVALID_ENT_REFERENCE (or -1) to NULL.

Fixes #1751

The param had to be a valid entity and wasn't allowed to be set to NULL. Behave similar to SetReturn which maps INVALID_ENT_REFERENCE (or -1) to NULL.
Copy link
Member

@psychonic psychonic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should probably get documented in the include file as well, that -1 is accepted for a NULL entity pointer.

@peace-maker peace-maker merged commit 39d604a into master Apr 20, 2022
@peace-maker peace-maker deleted the dhooks-setparam-nullentity branch April 20, 2022 13:32
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.

[DHooks] Cannot set CBaseEntity param to NULL

3 participants