Exemplo n.º 1
0
bool CCarCtrlHack::initialise()
{
	// reinit firetruck/ambulance timer (SilentPatch)
	InjectHook(0x004A489B, &CCarCtrlHack::ReInitHack);

	// CCarCtrl::MapCouldMoveInThisArea
	Patch<float>(0x00687028, -342.2f + OFFSETX);
	Patch<float>(0x0068702C, -219.2f + OFFSETX);

	return true;
}
Exemplo n.º 2
0
void
envmaphooks(void)
{
	InjectHook(0x536BCE, &CEntity::GetIsOnScreen);	// CEntity::IsVisible
	InjectHook(0x5540AD, &CEntity::GetIsOnScreen);	// CRenderer::SetupMapEntityVisibility
	InjectHook(0x554174, &CEntity::GetIsOnScreen);	// CRenderer::SetupMapEntityVisibility
	InjectHook(0x5543C2, &CEntity::GetIsOnScreen);	// CRenderer::SetupEntityVisibility
	InjectHook(0x554504, &CEntity::GetIsOnScreen);	// CRenderer::SetupEntityVisibility
	InjectHook(0x55495E, &CEntity::GetIsOnScreen);	// CRenderer::ScanSectorList
	InjectHook(0x409870, &CEntity::GetIsOnScreen);	// CStreaming::DeleteLeastUsedEntityRwObject
//	InjectHook(0x71FAE0, &CEntity::IsEntityOccluded, PATCH_JUMP);
//	InjectHook(0x420C40, madness, PATCH_JUMP);
	InterceptCall(&CRenderer__ConstructRenderList, RenderSphereReflections, 0x53E9F9);
}
Exemplo n.º 3
0
BOOL APIENTRY DllMain( HMODULE hModule,
                       DWORD  ul_reason_for_call,
                       LPVOID lpReserved
                     )
{
    switch (ul_reason_for_call)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
        InjectHook();
        break;
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}
Exemplo n.º 4
0
bool CBridgeHack::initialise()
{
	ReadCall(0x004A4EF6, CallInit);
	InjectHook(0x004A4EF6, &CBridgeHack::Init); // CGame::Initialise
	ReadCall(0x004A4620, CallUpdate);
	InjectHook(0x004A4620, &CBridgeHack::Update); // CGame::Process
	InjectHook(0x004BD7A1, &CBridgeHack::ThisIsABridgeObjectMovingUp); // CPlayerInfo::Process
	InjectHook(0x005418CD, &CBridgeHack::ShouldLightsBeFlashing); // CEntity::ProcessLightsForEntity
	InjectHook(0x005418E4, &CBridgeHack::ShouldLightsBeFlashing); // CEntity::ProcessLightsForEntity

	// workaround for vehicles to stop at lift bridge
	InjectHook(0x00463F80, &ShouldCarStopForBridge, PATCH_JUMP);

	return true;
}