network handle validation

stumbled upon race condition on "拜山2【bai mountain 2】" of m_hActiveWeapon not being updated during reinitialization along with entities or vice versa
This commit is contained in:
explorer 2025-02-11 18:04:05 +03:00
parent 386afb13c1
commit bb54206c74

View File

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