mirror of
https://github.com/CookiePLMonster/SilentPatch.git
synced 2024-12-28 23:03:01 +05:00
31-bit randomizer for fixing missing ped paths
This commit is contained in:
parent
3b98e5abaf
commit
c9e900fc87
1 changed files with 13 additions and 0 deletions
|
@ -702,6 +702,15 @@ void NewFrameRender(int nEvent, void* pParam)
|
|||
RsEventHandler(nEvent, pParam);
|
||||
}
|
||||
|
||||
#include <ctime>
|
||||
#include <random>
|
||||
|
||||
unsigned int UnsignedIntRand()
|
||||
{
|
||||
static std::ranlux48 generator (time(nullptr));
|
||||
return generator() & 0x7FFFFFFF;
|
||||
}
|
||||
|
||||
#include <xnamath.h>
|
||||
|
||||
static void* pNVCShader = nullptr;
|
||||
|
@ -2343,6 +2352,10 @@ void Patch_SA_10()
|
|||
|
||||
//Patch<BYTE>(0x5D7265, 0xEB);
|
||||
|
||||
// Proper randomizations
|
||||
InjectHook(0x44E82E, UnsignedIntRand); // Missing ped paths
|
||||
InjectHook(0x44ECEE, UnsignedIntRand); // Missing ped paths
|
||||
|
||||
|
||||
// Heli rotors
|
||||
InjectHook(0x6CAB70, &CPlane::Render_Stub, PATCH_JUMP);
|
||||
|
|
Loading…
Reference in a new issue