-
Notifications
You must be signed in to change notification settings - Fork 858
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
fix(vehicle): fix repair not working after going in water #2996
Conversation
Download the artifacts for this pull request: |
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 exclusively play in FPV, this fix is not acceptable to me as the original ticket submitter.
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.
Tested and working, but...
@xiaoxiao921 nailed it with the 0xD8 offset. Well done. Don't need anything else after that besides VEHICLE::SET_VEHICLE_FIXED(veh) |
I think this concept could be easily expanded to repairs from any sort of destructive event such as explosions. Would be handy since a lot of mod menus can just explode your vehicle, and not everyone likes playing with godmode. If vehicle repair can be refactored to remember the player's last vehicle (like we can with GET_VEHICLE_PED_IS_IN(ped, lastVehicle = true), then the vehicle could be repaired even without the player having to physically be inside it. The bitmask could probably work for that case as well to recover the vehicle from any destroyed state, including a smouldering heap. Then repair_engine_from_water could be renamed as something like repair_destroyed_vehicle. Would be great to be able to quickly repair a vehicle that was destroyed via explosion griefing without having to recall it from the PV list or call Mors. |
Closes #2995
It's a bandaid fix but it works, there are multiple issues though. First person can't be used anymore in that specific vehicle, and can't be rentered. I tried messing with the vehicle flags and physical flags without any success sadly.