-
-
Notifications
You must be signed in to change notification settings - Fork 529
Replace isPed/VehicleOnGround with isElementOnGround
#4575
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
base: master
Are you sure you want to change the base?
Conversation
| return CStaticFunctionDefinitions::SetElementOnFire(element, onFire); | ||
| } | ||
|
|
||
| bool CLuaElementDefs::IsElementOnGround(CElement* element) |
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.
Did you try this?
| bool CLuaElementDefs::IsElementOnGround(CElement* element) | |
| bool CLuaElementDefs::IsElementOnGround(std::variant<CPlayer*, CPed*, CVehicle*> element) |
This would allow ArgumentParser to natively handle the invalid argument case. (You'd need to change the implementation slightly though, signature change is not enough.)
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.
Didn't know about this, ty.
Updated
Closes #2650
Old methods got deprecated, but still working.
isElementOnGroundcombines bothisPedOnGround&&isVehicleOnGround