Example #1
0
void CColStore::SetCollisionRequired(const CVector& pos, int areaCode)
{
	if (areaCode == -1)
	{
		CPed* v3 = FindPlayerPed(-1);
		if (v3)
		{
			areaCode = v3->GetAreaCode();
		}
		else
		{
			areaCode = CGame::GetCurrentArea();
		}
	}
	gCollisionRequiredForAreaCode = areaCode;
	CVector2D sector(pos.x, pos.y);
	if (areaCode == CGame::GetCurrentArea())
	{
		ms_pQuadTree->ForAllMatching(sector, SetIfCollisionIsRequired);
	}
	else
	{
		ms_pQuadTree->ForAllMatching(sector, SetIfCollisionIsRequiredReducedBB);
	}
}
Example #2
0
void
RenderReflectionScene(void)
{
	if(CCutsceneMgr__ms_running)
		reflectionCamPos = TheCamera.GetPosition();
	else
		reflectionCamPos = FindPlayerPed(-1)->GetPosition();

	DefinedState();
	/* We do have fog for the sphere map but we have to calculate it ourselves  */
	RwRenderStateSet(rwRENDERSTATEFOGENABLE, 0);

	// Render the opaque world
	CRenderer::RenderRoadsAndBuildings();
	// and the transparent world
	CRenderer::RenderFadingInBuildings();
}