Nightvision (All Game Versions!)
Quick tut, but I have no desire to spend a long time on something so simple. Please, if you don't understand, don't ask. If this is useful to you, you'll know.
The addies I use here are 1.9.453.
Nightvision is a byte flag on WeaponStyles (CG+0x0374). Cross-ref it in IDA (press X) and look through until you find a line that tests for a byte flag of 40h. This is the function that checks for nightvision. Pay particular attention to this section:
The jnz there will trigger if the flag is found. Change it to a jump and it will always trigger, and you have nightvision. That approach, however, only works for IW5M and Tekno; it will crash your game on steam. On steam, you'll need to do something like this
every frame or more.
There, nightvision for all game versions.
The addies I use here are 1.9.453.
Nightvision is a byte flag on WeaponStyles (CG+0x0374). Cross-ref it in IDA (press X) and look through until you find a line that tests for a byte flag of 40h. This is the function that checks for nightvision. Pay particular attention to this section:
Code:
.text:0051DDB8 YesNV: ; CODE XREF: TestNightvision+E6j .text:0051DDB8 pop edi .text:0051DDB9 pop esi .text:0051DDBA mov al, 1 .text:0051DDBC pop ebx .text:0051DDBD pop ecx .text:0051DDBE retn .text:0051DDBF ; --------------------------------------------------------------------------- .text:0051DDBF .text:0051DDBF NVTest: ; CODE XREF: TestNightvision+CCj .text:0051DDBF test byte ptr Weaponstyles, 40h .text:0051DDC6 jnz short YesNV .text:0051DDC8 .text:0051DDC8 NoNV: ; CODE XREF: TestNightvision+C0j .text:0051DDC8 ; TestNightvision+D6j .text:0051DDC8 pop edi .text:0051DDC9 pop esi .text:0051DDCA xor al, al .text:0051DDCC pop ebx .text:0051DDCD pop ecx .text:0051DDCE retn .text:0051DDCE TestNightvision endp
Code:
*(BYTE*)WEAPONSTYLES |= 0x40
There, nightvision for all game versions.