diff options
Diffstat (limited to 'src/core/Camera.cpp')
-rw-r--r-- | src/core/Camera.cpp | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/src/core/Camera.cpp b/src/core/Camera.cpp index 35d230dc..623b2ea9 100644 --- a/src/core/Camera.cpp +++ b/src/core/Camera.cpp @@ -642,7 +642,11 @@ CCamera::CamControl(void) m_bInitialNodeFound = false; m_bInitialNoNodeStaticsSet = false; } +#ifdef GTA_TRAIN Process_Train_Camera_Control(); +#else + assert(0 && "this can't happen"); +#endif }else{ if(((CVehicle*)pTargetEntity)->IsBoat()) boatTarget = true; @@ -701,8 +705,8 @@ CCamera::CamControl(void) garageDoorPos2.z = 0.0f; #endif } - garageCenter.x = (pToGarageWeAreIn->m_fX1 + pToGarageWeAreIn->m_fX2)/2.0f; - garageCenter.y = (pToGarageWeAreIn->m_fY1 + pToGarageWeAreIn->m_fY2)/2.0f; + garageCenter.x = pToGarageWeAreIn->GetGarageCenterX(); + garageCenter.y = pToGarageWeAreIn->GetGarageCenterY(); garageCenter.z = 0.0f; if(whichDoor == 1) garageCenterToDoor = garageDoorPos1 - garageCenter; @@ -940,11 +944,13 @@ CCamera::CamControl(void) if(CCullZones::CamStairsForPlayer() && CCullZones::FindZoneWithStairsAttributeForPlayer()) stairs = true; // Some hack for Mr Whoopee in a bomb shop +#ifndef MIAMI // uhh, check this if(Cams[ActiveCam].Using3rdPersonMouseCam() && CCollision::ms_collisionInMemory == LEVEL_COMMERCIAL){ if(pTargetEntity->GetPosition().x < 83.0f && pTargetEntity->GetPosition().x > 18.0f && pTargetEntity->GetPosition().y < -305.0f && pTargetEntity->GetPosition().y > -390.0f) disableGarageCam = true; } +#endif if(!disableGarageCam && (CGarages::IsPointInAGarageCameraZone(pTargetEntity->GetPosition()) || stairs)){ if(!m_bGarageFixedCamPositionSet && m_bLookingAtPlayer){ if(pToGarageWeAreIn || stairs){ @@ -983,8 +989,8 @@ CCamera::CamControl(void) } if(pToGarageWeAreIn){ - garageCenter.x = (pToGarageWeAreIn->m_fX1 + pToGarageWeAreIn->m_fX2)/2.0f; - garageCenter.y = (pToGarageWeAreIn->m_fY1 + pToGarageWeAreIn->m_fY2)/2.0f; + garageCenter.x = pToGarageWeAreIn->GetGarageCenterX(); + garageCenter.y = pToGarageWeAreIn->GetGarageCenterY(); garageCenter.z = 0.0f; }else{ garageDoorPos1.z = 0.0f; @@ -1017,8 +1023,8 @@ CCamera::CamControl(void) if(PedZoomIndicator == CAM_ZOOM_TOPDOWN && !stairs){ garageCamPos = garageCenter; garageCamPos.z += FindPlayerPed()->GetPosition().z + 2.1f; - if(pToGarageWeAreIn && garageCamPos.z > pToGarageWeAreIn->m_fX2) // What? - garageCamPos.z = pToGarageWeAreIn->m_fX2; + if(pToGarageWeAreIn && garageCamPos.z > pToGarageWeAreIn->m_fSupX) // What? + garageCamPos.z = pToGarageWeAreIn->m_fSupX; }else garageCamPos.z = ground + 3.1f; SetCamPositionForFixedMode(garageCamPos, CVector(0.0f, 0.0f, 0.0f)); @@ -1533,7 +1539,6 @@ CCamera::UpdateTargetEntity(void) pTargetEntity = FindPlayerVehicle(); else{ pTargetEntity = FindPlayerPed(); -#ifndef GTA_PS2_STUFF // this keeps the camera on the player while entering cars if(PLAYER->GetPedState() == PED_ENTER_CAR || PLAYER->GetPedState() == PED_CARJACK || @@ -1543,7 +1548,6 @@ CCamera::UpdateTargetEntity(void) if(!enteringCar) if(Cams[ActiveCam].CamTargetEntity != pTargetEntity) Cams[ActiveCam].CamTargetEntity = pTargetEntity; -#endif } bool cantOpen = true; @@ -1562,16 +1566,9 @@ CCamera::UpdateTargetEntity(void) if((PLAYER->GetPedState() == PED_CARJACK || PLAYER->GetPedState() == PED_OPEN_DOOR) && !cantOpen){ if(!enteringCar && CarZoomIndicator != CAM_ZOOM_1STPRS) -#ifdef GTA_PS2_STUFF -// dunno if this has any amazing effects - { -#endif pTargetEntity = PLAYER->m_pMyVehicle; if(PLAYER->m_pMyVehicle == nil) pTargetEntity = PLAYER; -#ifdef GTA_PS2_STUFF - } -#endif } if(PLAYER->GetPedState() == PED_EXIT_CAR) @@ -2717,6 +2714,7 @@ CCamera::DontProcessObbeCinemaCamera(void) bDidWeProcessAnyCinemaCam = false; } +#ifdef GTA_TRAIN void CCamera::LoadTrainCamNodes(char const *name) { @@ -2894,6 +2892,7 @@ CCamera::Process_Train_Camera_Control(void) } } } +#endif void @@ -3189,7 +3188,7 @@ CCamera::RenderMotionBlur(void) CMBlur::MotionBlurRender(m_pRwCamera, m_BlurRed, m_BlurGreen, m_BlurBlue, - m_motionBlur, m_BlurType, m_imotionBlurAddAlpha); + m_motionBlur, m_BlurType); } void |