-
-
Notifications
You must be signed in to change notification settings - Fork 480
New vehicle features functions (setVehicleSpecialFeatureEnabled) #4330
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
Huge W |
Wow, thank you for this contribution! |
Towing ability for tow truck and other trucks like Roadtrain will be super cool. Afaik for this to work the DFF of the vehicle needs to have a special dummy that is positioned at the tow hitch (where the trailer/vehicle will attach), right? |
@@ -222,6 +222,13 @@ class CAutoPilot | |||
BYTE pad[56]; | |||
}; | |||
|
|||
enum class eComponentRotationAxis |
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.
enum class eComponentRotationAxis : uint8_t
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.
CVehicle::SetComponentRotation (0x6DBA30) expect int (4 bytes). Should i use static_cast for it?
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.
Then maybe better to use uint32_t and add a comment about the reason of choosing it.
This PR is the first step toward resolving #1861.
It introduces a new set of functions that allow manipulation of vehicle features. For now, only the water_cannon functionality is supported - additional features will be added in separate future PRs. These functions allow enabling or disabling the water cannon support.
Importantly, the functionality works both on a model level and on specific vehicles - this means, for example, you could implement a system where a firetruck can't use its water cannon if its tank is empty!
It works for both allocated vehicles and vanilla game vehicles.
Syntax
Available features: