Crosshair doesn't mess up weapon icon when on a jetpack anymore (hell knows why it bugged only on a jetpack)

This commit is contained in:
Silent 2014-08-19 15:05:42 +02:00
parent f73e9cfb07
commit fa7f70942b

View file

@ -167,17 +167,10 @@ RpGeometry* RpGeometryForAllMaterials(RpGeometry* geometry, RpMaterialCallBack f
RwInt32 RpHAnimIDGetIndex(RpHAnimHierarchy* hierarchy, RwInt32 ID) RwInt32 RpHAnimIDGetIndex(RpHAnimHierarchy* hierarchy, RwInt32 ID)
{ {
RpHAnimNodeInfo* curNodeInfo = hierarchy->pNodeInfo; for ( RwInt32 i = 0, j = hierarchy->numNodes; i < j; i++ )
RwInt32 curNumNodes = hierarchy->numNodes;
if ( curNumNodes > 0 )
{ {
for ( RwInt32 i = 0; i < curNumNodes; i++ ) if ( ID == hierarchy->pNodeInfo[i].nodeID )
{ return i;
if ( ID == curNodeInfo->nodeID )
return i;
curNodeInfo++;
}
} }
return -1; return -1;
} }
@ -1557,7 +1550,11 @@ __forceinline void Patch_SA_10()
Patch<BYTE>(0x6CABD0, 0xEB); Patch<BYTE>(0x6CABD0, 0xEB);
Patch<DWORD>(0x6CAC05, 0x5E5FCF8B); Patch<DWORD>(0x6CAC05, 0x5E5FCF8B);
InjectHook(0x6CAC09, &CPlane::Fix_SilentPatch, PATCH_JUMP); InjectHook(0x6CAC09, &CPlane::Fix_SilentPatch, PATCH_JUMP);
// Weapon icon fix (crosshairs mess up rwRENDERSTATEZWRITEENABLE)
Nop(0x58E210, 3);
Nop(0x58EAB7, 3);
Nop(0x58EAE1, 3);
// Zones fix // Zones fix
InjectHook(0x572130, GetCurrentZoneLockedOrUnlocked, PATCH_JUMP); InjectHook(0x572130, GetCurrentZoneLockedOrUnlocked, PATCH_JUMP);