Rework Keep Vehicle Repaired to remove damage decals properly. (#2044)

* Keep Vehicle Repaired now uses CDecalManager to remove damage decals which allows it to ignore clan and livery decals.

* Added more conditions to call SET_VEHICLE_FIXED to fix things like the R88 breaking its shell off.
Fixed Seatbelt having inverted conditions.

* Fixed keep_vehicle_repaired repairing things it doesn't need to repair if godmode/always clean is on already.
Fixed spawn_vehicle_json not applying the radio station.

* Consolidated signature for CDecalMgr::ClearDecals and its static instance.
This commit is contained in:
gir489
2023-08-28 05:35:17 -04:00
committed by GitHub
parent ac41a7175b
commit 5eccb9def4
6 changed files with 39 additions and 12 deletions

View File

@ -188,6 +188,8 @@ namespace big
const auto vehicle = big::vehicle::spawn(vehicle_hash, pos, ENTITY::GET_ENTITY_HEADING(ped));
script::get_current()->yield(); //This is needed to wait for the engine to instantiate things like the radio station so it won't overwrite it on the next frame.
VEHICLE::SET_VEHICLE_DIRT_LEVEL(vehicle, 0.0f);
VEHICLE::SET_VEHICLE_MOD_KIT(vehicle, 0);
VEHICLE::SET_VEHICLE_TYRES_CAN_BURST(vehicle, false);