From bb54206c74f07cd597fd0bd0eebc0d3d0ca63309 Mon Sep 17 00:00:00 2001 From: explorer Date: Tue, 11 Feb 2025 18:04:05 +0300 Subject: [PATCH] network handle validation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit stumbled upon race condition on "拜山2【bai mountain 2】" of m_hActiveWeapon not being updated during reinitialization along with entities or vice versa --- Copy_Command.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Copy_Command.hpp b/Copy_Command.hpp index 06a7a57..457e432 100644 --- a/Copy_Command.hpp +++ b/Copy_Command.hpp @@ -343,7 +343,9 @@ void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structu if (Can_Attack_Type((unsigned __int32)Client_Module + 2541696)(Local_Player) == 1) { - void* Weapon = *(__int8*)((unsigned __int32)Local_Player + 7867) == 0 ? *(void**)((unsigned __int32)Client_Module + 7644532 + (((*(unsigned __int32*)((unsigned __int32)Local_Player + 4228) & 4095) - 4097) << 4)) : nullptr; + using Get_Weapon_Type = void*(__thiscall*)(void* Entity); + + void* Weapon = *(__int8*)((unsigned __int32)Local_Player + 7867) == 0 ? Get_Weapon_Type((unsigned __int32)Client_Module + 74304)(Local_Player) : nullptr; if (Weapon == nullptr) {