Americas Army 2:Stryker - Modification for your d3d8 hack
By: darkzangel
Here is some more code that i change in my hack and that i release here. This code is for the stryker. It remove all shit and let you have a full screen view. I hope that it will not miss any code because there're alot of code to be able to do that. This code do 3 different thing. The first one is to remove scope, the second is for increase the mouse speed when you are in the striker and the last one is for remove tree around striker. If you want to see what it look like after apply this, just check the attached image.
If you improve any problems with this code, just send me a pm or just post here and i will try to resolve it.
Here is the modification to do in your code :
In the file NewIDirect3DDevice8.cpp :
Search this :
if (m_pCurrentTexture->m_Crc32 == 0x6FB53D29) { if (GameInfo.m_Settings.m_bNVNoGreen) return D3D_OK; }
Add this :
// In Stryker mode if (GameInfo.m_iHUD == 4) { if (m_pCurrentTexture->m_Crc32 == 0x9db9072f && !GameInfo.m_StatusInMenu && !GameInfo.m_StatusScores && GameInfo.m_StatusMovement != MOVEMENT_UNKNOWN) { if (GameInfo.m_Stryker.m_InStryker == false) { GameInfo.m_Settings.m_MouseSpeed = GameInfo.m_Settings.m_MouseSpeed * GameInfo.m_Settings.m_StrykerMouseSpeedFactor; GameInfo.m_Stryker.m_InStryker = true; } return 0; } else { if (GameInfo.m_Stryker.m_InStryker == true) { GameInfo.m_Settings.m_MouseSpeed = GameInfo.m_Settings.m_MouseSpeed / GameInfo.m_Settings.m_StrykerMouseSpeedFactor; GameInfo.m_Stryker.m_InStryker = false; } } } if (GameInfo.m_iHUD == 5 && m_pCurrentTexture->m_Crc32 == 0x301379ce && GameInfo.m_Stryker.m_InStryker == true) { return 0; }
In HRESULT __stdcall NewIDirect3DDevice8:: DrawIndexedPrimitive, just after #endif add this :
// In Stryker mode if (GameInfo.m_Stryker.m_InStryker && m_pCurrentTexture->m_Crc32 == 0x8267af1f) // Draw canon in wireframe { DWORD curState; GetRenderState(D3DRS_FILLMODE, &curState); SetRenderState(D3DRS_FILLMODE, D3DFILL_WIREFRAME); Result = pD3DDevice8->DrawIndexedPrimitive(Type, MinIndex, NumVertices, StartIndex, PrimitiveCount); SetRenderState(D3DRS_FILLMODE, curState); return Result; }
Search this :
//Removing 3D sights if (GameInfo.m_Settings.m_bNoBlackouts) { if ((MinIndex == 1380 && //M4 SOPMOD NumVertices == 2169 && PrimitiveCount == 1399) || (MinIndex == 0 && //M4 SOPMOD rear sight NumVertices == 767 && PrimitiveCount == 770) || (MinIndex == 0 && //M4 SOPMOD ACOG Reflex sight NumVertices == 805 && PrimitiveCount == 742) || (MinIndex == 1380 && //AKS-74U NumVertices == 1535 && PrimitiveCount == 1225) || (MinIndex == 0 && //AKS-74U rear sight NumVertices == 200 && PrimitiveCount == 200) || (MinIndex == 1468 && //M9 rear sight (slide) NumVertices == 1540 && PrimitiveCount == 442)) return D3D_OK; }
Replace with this :
//Removing 3D sights if (GameInfo.m_Settings.m_bNoBlackouts) { if ((MinIndex == 1380 && //M4 SOPMOD NumVertices == 2169 && PrimitiveCount == 1399) || (MinIndex == 0 && //M4 SOPMOD rear sight NumVertices == 767 && PrimitiveCount == 770) || (MinIndex == 0 && //M4 SOPMOD ACOG Reflex sight NumVertices == 805 && PrimitiveCount == 742) || (MinIndex == 1380 && //AKS-74U NumVertices == 1535 && PrimitiveCount == 1225) || (MinIndex == 0 && //AKS-74U rear sight NumVertices == 200 && PrimitiveCount == 200) || (MinIndex == 1468 && //M9 rear sight (slide) NumVertices == 1540 && PrimitiveCount == 442)) return D3D_OK; // Wireframe some object if (m_pCurrentTexture->m_Crc32 == 0xb2071a40 || m_pCurrentTexture->m_Crc32 == 0xf6cb84e5 || // tree m_pCurrentTexture->m_Crc32 == 0xb2071a40 || // tree m_pCurrentTexture->m_Crc32 == 0x7e33450c || // tree m_pCurrentTexture->m_Crc32 == 0x40c3e733 || // Grass m_pCurrentTexture->m_Crc32 == 0xb389e953 || // tree m_pCurrentTexture->m_Crc32 == 0x59714ffe) // tree { DWORD curState; GetRenderState(D3DRS_FILLMODE, &curState); SetRenderState(D3DRS_FILLMODE, D3DFILL_WIREFRAME); Result = pD3DDevice8->DrawIndexedPrimitive(Type, MinIndex, NumVertices, StartIndex, PrimitiveCount); SetRenderState(D3DRS_FILLMODE, curState); return Result; }
In the file GameInfo.h
Search this :
int m_iHUD;
Add this :
CStryker m_Stryker;
In the file EvilSetting.h
Search this :
DWORD m_MouseSpeed;
Add this :
int m_StrykerMouseSpeedFactor;
In the file structs.h :
Search this :
struct object_t { unsigned int min; //MinIndex unsigned int num; //NumVertices unsigned int count; //PrimitiveCount unsigned char stride; };
Add this :
struct CStryker { bool m_InStryker; };
In the file SloppyAim.cpp :
Search this :
long int MoveX, MoveY; MoveX = (unsigned long)((AngleZ * GameInfo.m_WeaponsList[GameInfo.m_StatusWeapon].GetMouseMoveX()) + 0.5f); MoveY = (unsigned long)((AngleX * GameInfo.m_WeaponsList[GameInfo.m_StatusWeapon].GetMouseMoveY()) + 0.5f);
And replace by this :
long int MoveX, MoveY; MoveX = (unsigned long)((AngleZ * GameInfo.m_WeaponsList[GameInfo.m_StatusWeapon].GetMouseMoveX())*(GameInfo.m_Stryker.m_InStryker?GameInfo.m_Settings.m_StrykerMouseSpeedFactor:1) + 0.5f); MoveY = (unsigned long)((AngleX * GameInfo.m_WeaponsList[GameInfo.m_StatusWeapon].GetMouseMoveY())*(GameInfo.m_Stryker.m_InStryker?GameInfo.m_Settings.m_StrykerMouseSpeedFactor:1) + 0.5f);
In the file EvilSettings.cpp :
Search this :
m_HFont = defaultFont; m_FFont = defaultFont; m_MouseSpeed = 750;
Add this :
m_StrykerMouseSpeedFactor = 4;
As you can see, i but m_StrykerMouseSpeedFactor is the setting, but i dont do anything to change it in the evilconfig.exe because the factor "4" is the good one to make the speed of your mouse the same inside and outside the stryker, but it will be very easy to add it.
EDIT : Be sure that you have this in GameInfo.cpp :
m_iHUD = 0; #ifdef TESTMODE
The m_iHUD = 0 MUST BE BEFORE #ifdef TESTMODE. Also, you need to have this :
HRESULT __stdcall NewIDirect3DDevice8:rawPrimitive(D3DPRIMITIVETYPE PrimitiveType, UINT StartVertex, UINT PrimitiveCount) { GameInfo.m_iHUD++;
I hope that i dont forget anything.
darkzangel
I fix also some other thing (NOT NEEDED TO MAKE THE LAST CODE WORKING, IT'S JUST A GENERAL FIX) : Search this in Intelliquipment.cpp :
if (GameInfo.m_Settings.m_bAutoReload)
Replace it with :
if (GameInfo.m_Settings.m_bAutoReload && !GameInfo.m_StatusInMenu && !GameInfo.m_StatusScores && !GameInfo.m_StatusConsole && GameInfo.m_StatusMovement != MOVEMENT_UNKNOWN)
Search this :
if (GameInfo.m_Settings.m_bAutoFixJam)
Replace it with :
if (GameInfo.m_Settings.m_bAutoFixJam && !GameInfo.m_StatusInMenu && !GameInfo.m_StatusScores && !GameInfo.m_StatusConsole && GameInfo.m_StatusMovement != MOVEMENT_UNKNOWN)
This last code remove the "r" and the "f" when you chat with others players.