diff --git a/section/WeaponAimFix.cpp b/section/WeaponAimFix.cpp index 43cf8c72..5f117b06 100644 --- a/section/WeaponAimFix.cpp +++ b/section/WeaponAimFix.cpp @@ -13,23 +13,22 @@ void asm__fixWeaponAim() "movss xmm1, dword ptr ss:[eax];" // targetPos.z "movss xmm2, dword ptr ss:[eax+0x8];" // targetPos.y - "mov eax, dword ptr ds:[esi+0x4];" // CAiTarget->entity + "mov eax, dword ptr ds:[esi+0x4];" // CAiTarget->wp_entity->weakObj "test eax, eax;" "je EXIT;" // no targetEnity when groundfiring "push ebx;" - "cmp dword ptr ds:[esi+0x10], 0xF;" // 0xF = auto fire, no attack order. + // "cmp dword ptr ds:[esi+0x10], 0xF;" // 0xF = auto fire, no attack order. // the route to entity->lastUpdateTick is different - "je noAttackOrder;" // when there is an attack order + // "je noAttackOrder;" // when there is an attack order - "mov eax, dword ptr ds:[eax+0x5C];" - "sub eax, 0x5C;" + "lea eax, dword ptr ds:[eax-4];" // *weakObj - 4 = entity - "noAttackOrder:;" - "mov ebx, dword ptr ds:[eax+0x144];" + // "noAttackOrder:;" + "mov ebx, dword ptr ds:[eax+0x148];" "mov ebx, dword ptr ds:[ebx+0x900];" // sim->currentTick - "cmp ebx, dword ptr ds:[eax+0x170];" // entity->lastUpdateTick + "cmp ebx, dword ptr ds:[eax+0x174];" // entity->lastUpdateTick "pop ebx;" "je EXIT;" // entityLastUpdateTick == currentSimTick means the target's pos is up-to-date