mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2026-10-10 11:53:07 +08:00
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:
@@ -1630,6 +1630,16 @@ namespace big
|
||||
{
|
||||
g_pointers->m_gta.m_activate_special_ability_patch = ptr.as<PVOID>();
|
||||
}
|
||||
},
|
||||
// ClearDecals
|
||||
{
|
||||
"DCLMGR",
|
||||
"48 8D 0D ? ? ? ? 41 83 C8 FF E8 ? ? ? ? 4C",
|
||||
[](memory::handle ptr)
|
||||
{
|
||||
g_pointers->m_gta.m_decal_manager = ptr.add(3).rip().as<PVOID>();
|
||||
g_pointers->m_gta.m_decal_manager_remove = ptr.add(0xC).rip().as<functions::decal_manager_remove>();
|
||||
}
|
||||
}
|
||||
>(); // don't leave a trailing comma at the end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user