Removed the redundant loop in the unlimited ammo exploit fix.

This commit is contained in:
NovaRain
2016-08-22 09:42:01 +08:00
parent bfd8b38547
commit f0528740a4
-2
View File
@@ -296,7 +296,6 @@ static void __declspec(naked) invenWieldFunc_item_get_type_hook() {
xchg edx, eax // eax = who, edx = item xchg edx, eax // eax = who, edx = item
call item_remove_mult_ call item_remove_mult_
xchg ebx, eax xchg ebx, eax
nextWeapon:
mov eax, esi mov eax, esi
test cl, 0x2 // Right hand? test cl, 0x2 // Right hand?
jz leftHand // No jz leftHand // No
@@ -308,7 +307,6 @@ removeFlag:
test eax, eax test eax, eax
jz noWeapon jz noWeapon
and byte ptr [eax+0x27], 0xFC // Unset flag of a weapon in hand and byte ptr [eax+0x27], 0xFC // Unset flag of a weapon in hand
jmp nextWeapon
noWeapon: noWeapon:
or byte ptr [edi+0x27], cl // Set flag of a weapon in hand or byte ptr [edi+0x27], cl // Set flag of a weapon in hand
inc ebx inc ebx