From 510097883faee25751d1a66a92308c56863ab659 Mon Sep 17 00:00:00 2001 From: doxoh Date: Sat, 21 Oct 2023 16:24:32 +0200 Subject: [PATCH] Add IPlayer RemoveHeadBlendData --- c-api/entities/player.cpp | 5 +++++ c-api/entities/player.h | 1 + c-api/func_table.cpp | 4 +++- cpp-sdk | 2 +- 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/c-api/entities/player.cpp b/c-api/entities/player.cpp index 1977179..99d4819 100644 --- a/c-api/entities/player.cpp +++ b/c-api/entities/player.cpp @@ -520,6 +520,11 @@ void Player_SetHeadBlendData(alt::IPlayer* player, uint32_t shapeFirstID, uint32 player->SetHeadBlendData(shapeFirstID, shapeSecondID, shapeThirdID, skinFirstID, skinSecondID, skinThirdID, shapeMix, skinMix, thirdMix); } +void Player_RemoveHeadBlendData(alt::IPlayer* player) +{ + player->RemoveHeadBlendData(); +} + void Player_GetHeadBlendData(alt::IPlayer* player, head_blend_data_t &headBlendData) { auto playerHeadBlendData = player->GetHeadBlendData(); headBlendData.shapeFirstID = playerHeadBlendData.shapeFirstID; diff --git a/c-api/entities/player.h b/c-api/entities/player.h index 47e3bc8..5ac96bb 100644 --- a/c-api/entities/player.h +++ b/c-api/entities/player.h @@ -152,6 +152,7 @@ EXPORT_SERVER void Player_GetHeadBlendPaletteColor(alt::IPlayer* player, uint8_t EXPORT_SERVER void Player_SetHeadBlendData(alt::IPlayer* player, uint32_t shapeFirstID, uint32_t shapeSecondID, uint32_t shapeThirdID, uint32_t skinFirstID, uint32_t skinSecondID, uint32_t skinThirdID, float shapeMix, float skinMix, float thirdMix); +EXPORT_SERVER void Player_RemoveHeadBlendData(alt::IPlayer* player); EXPORT_SERVER void Player_GetHeadBlendData(alt::IPlayer* player, head_blend_data_t& headBlendData); EXPORT_SERVER uint8_t Player_SetEyeColor(alt::IPlayer* player, uint16_t eyeColor); diff --git a/c-api/func_table.cpp b/c-api/func_table.cpp index 276e208..29def87 100644 --- a/c-api/func_table.cpp +++ b/c-api/func_table.cpp @@ -1,6 +1,6 @@ #include "func_table.h" -inline uint64_t capiHash = 16677003916101455049UL; +inline uint64_t capiHash = 13325244553859733034UL; inline uint64_t capiHashes[] = { 0, #ifdef ALT_CLIENT_API @@ -1489,6 +1489,7 @@ inline uint64_t capiHashes[] = { 2232062854990357196UL, 3139723963307924640UL, 1204109734587833282UL, + 8805714842908729165UL, 12300710546613769705UL, 6739305111416325852UL, 937601034617427157UL, @@ -3234,6 +3235,7 @@ inline void* capiPointers[] = { (void*) Player_RemoveAllWeapons, (void*) Player_RemoveDecoration, (void*) Player_RemoveFaceFeature, + (void*) Player_RemoveHeadBlendData, (void*) Player_RemoveHeadOverlay, (void*) Player_RemoveWeapon, (void*) Player_RemoveWeaponComponent, diff --git a/cpp-sdk b/cpp-sdk index c2e95d1..fb89bd9 160000 --- a/cpp-sdk +++ b/cpp-sdk @@ -1 +1 @@ -Subproject commit c2e95d1fbbf72278f0061803f5b9cef93e1fbe8c +Subproject commit fb89bd99dc254c04ccdf3490ed06855849ec8c96