fix: ped body clean up logic (#2764)

This commit is contained in:
lonelybud 2024-02-24 01:30:26 +05:30 committed by GitHub
parent b150009e28
commit 5b73acecc2

View File

@ -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)