Remember google is your friend.
No Recoil, no sources? Nope, you'll get it or don't read this. Recoil can be stopped in many ways. Since you're using C++, I'll show you C++ code.
The game has structures that stores things like weapon recoil scale (Which is what you want), the view angles etc.
So we'll look into the viewmatrix structure:
So now, we need an address right? Well coders usually use something called "patterns" to find these things. You need a reverser like OllyDbg or IDA (Interactive Disassembler). Get those and a plugin to create patterns.
float Recoil; //3D Recoil vector
So using the above, load up the game process (As in not opening the game and just select the module, eg "iw4mp.exe") in it. Browse to the given address of an older version (As this is the only way to find patterns unless they are already released). There, use the x-references that check for where the address is called in the game.
A bit of assembly helps here too. So, let's say it's used at 0x7FFF0000 and this is the opcode (Meaning assembly code) at this address:
Now with the cursor on the, create a pattern. IDA can check for these patterns later. You should get the result as either:
mov eax, dword_XXXXXXXX; //where dword_XXXXXXXX is the offset for viewmatrix, this is an example, this might not be your case
00 01 02 03 04 05 06 06 06 07 07 07 08 08 08 x????xxxxxxxxx
Or if you chose IDA format:
So simply locate the new address in a newer version and you should find something like
00 ? ? ? ? 05 06 06 06 07 07 07 08 08 08
So voila. Now you have an offset. If you have trouble understanding, GOOGLE.
mov eax, dword_YXYXYXYX; //Your new offset
So let's apply the offset to a new ViewMatrix_T object:
And then, in a thread or a game thread, just null the vector:
ViewMatrix_T* cView = (ViewMatrix_T*)0xYXYXYXYX;
There you go. A basic crasher course.
for( int i = 0; i < 3; i++ ) cView->Recoil[ i ] = 0.f;