-
-
Notifications
You must be signed in to change notification settings - Fork 452
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
Rename handlers and events for entity processing consistency #3925
base: master
Are you sure you want to change the base?
Conversation
Can you add a warning/error to addEventHandler whenever somebody tries to register a handler for |
I'll find a way to do it |
This event should be named "onClientPostUpdate". It will describe the meaning of the event better. |
… update related references
if (m_pRootEntity->CallEvent("onClientPedsProcessed", Arguments, false)) | ||
{ | ||
throw std::runtime_error("'onClientPedsProcessed' is no longer supported, renamed to 'onClientPostUpdate'"); | ||
return; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The better solution would be to just assume onClientPostUpdate
when somebody does addEventHandler("onClientPedsProcessed", ...)
but also show a warning.
if (m_pRootEntity->CallEvent("onClientPedsProcessed", Arguments, false)) | ||
{ | ||
CStaticFunctionDefinitions::AddEventHandler("onClientPedsProcessed", "onClientPostUpdate", "The 'onClientPedsProcessed' event is deprecated and has been renamed to 'onClientPostUpdate'."); | ||
return; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know how you came up with the idea to put that here, remove it and adapt CStaticFunctionDefinitions::AddEventHandler
.
The change from
onClientPedsProcessed
toonClientEntitiesProcessed
indicates that the event is not only related to pedestrians, but can also be used on various elements, for example: #3922 The idea to revive the event came from this issue.The ped manipulators have also been renamed to entities.