Skip to content

Conversation

@Xenius97
Copy link
Contributor

Closes #2650

Old methods got deprecated, but still working. isElementOnGround combines both isPedOnGround && isVehicleOnGround

@FileEX FileEX added the enhancement New feature or request label Nov 27, 2025
@Xenius97 Xenius97 requested a review from FileEX November 27, 2025 15:48
FileEX
FileEX previously approved these changes Nov 28, 2025
tederis
tederis previously approved these changes Dec 2, 2025
@Xenius97 Xenius97 closed this Jan 6, 2026
@Xenius97 Xenius97 reopened this Jan 6, 2026
return CStaticFunctionDefinitions::SetElementOnFire(element, onFire);
}

bool CLuaElementDefs::IsElementOnGround(CElement* element)
Copy link
Member

@qaisjp qaisjp Jan 7, 2026

Choose a reason for hiding this comment

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

Did you try this?

Suggested change
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.)

Copy link
Contributor Author

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

@Xenius97 Xenius97 dismissed stale reviews from tederis and FileEX via 666944f January 7, 2026 07:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Merge isVehicleOnGround and isPedOnGround into one function "isElementOnGround"

4 participants