mirror of
https://github.com/CookiePLMonster/SilentPatch.git
synced 2024-12-29 15:23:02 +05:00
"Streaming memory bug" fix - 1.0
This commit is contained in:
parent
5816666e55
commit
20550b5ed0
1 changed files with 27 additions and 1 deletions
|
@ -876,6 +876,29 @@ void StencilShadowAlloc( )
|
|||
}
|
||||
}
|
||||
|
||||
RwBool GTARtAnimInterpolatorSetCurrentAnim(RtAnimInterpolator* animI, RtAnimAnimation* anim)
|
||||
{
|
||||
animI->pCurrentAnim = anim;
|
||||
animI->currentTime = 0.0f;
|
||||
|
||||
const RtAnimInterpolatorInfo* info = anim->interpInfo;
|
||||
animI->currentInterpKeyFrameSize = info->interpKeyFrameSize;
|
||||
animI->currentAnimKeyFrameSize = info->animKeyFrameSize;
|
||||
animI->keyFrameApplyCB = info->keyFrameApplyCB;
|
||||
animI->keyFrameBlendCB = info->keyFrameBlendCB;
|
||||
animI->keyFrameInterpolateCB = info->keyFrameInterpolateCB;
|
||||
animI->keyFrameAddCB = info->keyFrameAddCB;
|
||||
|
||||
for ( RwInt32 i = 0; i < animI->numNodes; ++i )
|
||||
RtAnimKeyFrameInterpolateMacro( animI, rtANIMGETINTERPFRAME( animI, i ),
|
||||
(RwChar*)anim->pFrames + i * animI->currentAnimKeyFrameSize,
|
||||
(RwChar*)anim->pFrames + ( i + animI->numNodes) * animI->currentAnimKeyFrameSize, 0.0f );
|
||||
|
||||
animI->pNextFrame = (RwChar*)anim->pFrames + 2 * animI->currentAnimKeyFrameSize * animI->numNodes;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
#include <xnamath.h>
|
||||
|
||||
|
@ -2976,6 +2999,9 @@ void Patch_SA_10()
|
|||
Patch<DWORD>(0x711E5F, 0x90C35D5F); // pop edi, pop ebp, ret
|
||||
|
||||
|
||||
// "Streaming memory bug" fix
|
||||
InjectHook(0x4C51A9, GTARtAnimInterpolatorSetCurrentAnim);
|
||||
|
||||
|
||||
// Fixed police scanner names
|
||||
char* pScannerNames = *(char**)0x4E72D4;
|
||||
|
|
Loading…
Reference in a new issue