From cc4f5f46ced3af9a0e1e64383122dbca47e70d09 Mon Sep 17 00:00:00 2001 From: Sardelka Date: Sat, 18 Jun 2022 12:04:31 +0800 Subject: [PATCH] Urgh... --- RageCoop.Client/Sync/Entities/SyncedPed.cs | 2 +- RageCoop.Client/Util/PedExtensions.cs | 10 ++-------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/RageCoop.Client/Sync/Entities/SyncedPed.cs b/RageCoop.Client/Sync/Entities/SyncedPed.cs index 2ba9370..da124f1 100644 --- a/RageCoop.Client/Sync/Entities/SyncedPed.cs +++ b/RageCoop.Client/Sync/Entities/SyncedPed.cs @@ -292,7 +292,7 @@ namespace RageCoop.Client { for (byte i = 0; i < 11; i++) { - Function.Call(Hash.SET_PED_COMPONENT_VARIATION, MainPed.Handle, i, Clothes[i], Clothes[i+11], Clothes[i+22]); + Function.Call(Hash.SET_PED_COMPONENT_VARIATION, MainPed.Handle, i, (int)Clothes[i], (int)Clothes[i+11], (int)Clothes[i+22]); } _lastClothes = Clothes; } diff --git a/RageCoop.Client/Util/PedExtensions.cs b/RageCoop.Client/Util/PedExtensions.cs index bc8b7a5..b35f664 100644 --- a/RageCoop.Client/Util/PedExtensions.cs +++ b/RageCoop.Client/Util/PedExtensions.cs @@ -72,14 +72,8 @@ namespace RageCoop.Client for (byte i = 0; i < 11; i++) { result[i]=(byte)Function.Call(Hash.GET_PED_DRAWABLE_VARIATION, ped.Handle, i); - } - for (byte i = 11; i < 22; i++) - { - result[i]=(byte)Function.Call(Hash.GET_PED_TEXTURE_VARIATION, ped.Handle, i); - } - for (byte i = 22; i < 33; i++) - { - result[i]=(byte)Function.Call(Hash.GET_PED_PALETTE_VARIATION, ped.Handle, i); + result[i+11]=(byte)Function.Call(Hash.GET_PED_TEXTURE_VARIATION, ped.Handle, i); + result[i+22]=(byte)Function.Call(Hash.GET_PED_PALETTE_VARIATION, ped.Handle, i); } return result; }