From c629dd1e09eb8f3a17ece8162ff260815dd3d859 Mon Sep 17 00:00:00 2001 From: lonelybud <139460769+lonelybud@users.noreply.github.com> Date: Sat, 24 Feb 2024 01:30:26 +0530 Subject: [PATCH] fix: ped body clean up logic (#2764) --- src/util/entity.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/util/entity.cpp b/src/util/entity.cpp index ec74bbe8..751a4f50 100644 --- a/src/util/entity.cpp +++ b/src/util/entity.cpp @@ -12,12 +12,15 @@ namespace big::entity void clean_ped(Ped ped) { - Ped player_ped = self::ped; + PED::CLEAR_PED_BLOOD_DAMAGE(ped); + PED::CLEAR_PED_WETNESS(ped); + PED::CLEAR_PED_ENV_DIRT(ped); + PED::RESET_PED_VISIBLE_DAMAGE(ped); - PED::CLEAR_PED_BLOOD_DAMAGE(player_ped); - PED::CLEAR_PED_WETNESS(player_ped); - PED::CLEAR_PED_ENV_DIRT(player_ped); - PED::RESET_PED_VISIBLE_DAMAGE(player_ped); + // https://forum.cfx.re/t/information-needed-to-clear-visible-player-damage-scars-etc/283216 + // https://docs.fivem.net/natives/?_0x397C38AA7B4A5F83 + for (int i = 0; i <= 5; ++i) + PED::CLEAR_PED_DAMAGE_DECAL_BY_ZONE(ped, i, "ALL"); } void delete_entity(Entity& ent, bool force)