Small camera fixes
This commit is contained in:
parent
0ed9b0574b
commit
560fc65538
@ -1107,7 +1107,7 @@ void CReplay::TriggerPlayback(uint8 cam_mode, float cam_x, float cam_y, float ca
|
||||
CStreaming::LoadScene(ff_coord);
|
||||
}
|
||||
if (cam_mode == REPLAYCAMMODE_ASSTORED)
|
||||
TheCamera.CarZoomIndicator = 5.0f;
|
||||
TheCamera.CarZoomIndicator = CAM_ZOOM_CINEMATIC;
|
||||
}
|
||||
|
||||
void CReplay::StoreStuffInMem(void)
|
||||
|
@ -4672,15 +4672,15 @@ CCam::Process_FollowCar_SA(const CVector& CameraTarget, float TargetOrientation,
|
||||
else {
|
||||
switch ((int)TheCamera.CarZoomIndicator) {
|
||||
// near
|
||||
case 1:
|
||||
case CAM_ZOOM_1:
|
||||
zoomModeAlphaOffset = ZmOneAlphaOffsetLCS[alphaArrPos];
|
||||
break;
|
||||
// mid
|
||||
case 2:
|
||||
case CAM_ZOOM_2:
|
||||
zoomModeAlphaOffset = ZmTwoAlphaOffsetLCS[alphaArrPos];
|
||||
break;
|
||||
// far
|
||||
case 3:
|
||||
case CAM_ZOOM_3:
|
||||
zoomModeAlphaOffset = ZmThreeAlphaOffsetLCS[alphaArrPos];
|
||||
break;
|
||||
default:
|
||||
@ -4705,14 +4705,12 @@ CCam::Process_FollowCar_SA(const CVector& CameraTarget, float TargetOrientation,
|
||||
}
|
||||
} else {
|
||||
// 0.6f = fTestShiftHeliCamTarget
|
||||
TargetCoors.x += 0.6f * car->GetUp().x * colMaxZ;
|
||||
TargetCoors.y += 0.6f * car->GetUp().y * colMaxZ;
|
||||
TargetCoors.z += 0.6f * car->GetUp().z * colMaxZ;
|
||||
TargetCoors += 0.6f * car->GetUp() * colMaxZ;
|
||||
}
|
||||
|
||||
float minDistForVehType = CARCAM_SET[camSetArrPos][4];
|
||||
|
||||
if ((int)TheCamera.CarZoomIndicator == 1 && (camSetArrPos < 2 || camSetArrPos == 7)) {
|
||||
if (TheCamera.CarZoomIndicator == CAM_ZOOM_1 && (camSetArrPos < 2 || camSetArrPos == 7)) {
|
||||
minDistForVehType = minDistForVehType * 0.65f;
|
||||
}
|
||||
|
||||
@ -4904,8 +4902,8 @@ CCam::Process_FollowCar_SA(const CVector& CameraTarget, float TargetOrientation,
|
||||
// yMovement = 0.0;
|
||||
|
||||
if (!nextDirectionIsForward) {
|
||||
yMovement = 0.0;
|
||||
xMovement = 0.0;
|
||||
yMovement = 0.0f;
|
||||
xMovement = 0.0f;
|
||||
}
|
||||
|
||||
if (camSetArrPos == 0 || camSetArrPos == 7) {
|
||||
|
@ -124,8 +124,8 @@ CCamera::Init(void)
|
||||
m_WideScreenOn = false;
|
||||
m_fFOV_Wide_Screen = 0.0f;
|
||||
m_bRestoreByJumpCut = false;
|
||||
CarZoomIndicator = 2.0f;
|
||||
PedZoomIndicator = 2.0f;
|
||||
CarZoomIndicator = CAM_ZOOM_2;
|
||||
PedZoomIndicator = CAM_ZOOM_2;
|
||||
CarZoomValueSmooth = 0.0f;
|
||||
m_fPedZoomValueSmooth = 0.0f;
|
||||
pTargetEntity = nil;
|
||||
@ -623,11 +623,11 @@ CCamera::CamControl(void)
|
||||
if(CPad::GetPad(0)->CycleCameraModeUpJustDown() && !CReplay::IsPlayingBack() &&
|
||||
(m_bLookingAtPlayer || WhoIsInControlOfTheCamera == CAMCONTROL_OBBE) &&
|
||||
!m_WideScreenOn)
|
||||
CarZoomIndicator -= 1.0f;
|
||||
CarZoomIndicator--;
|
||||
if(CPad::GetPad(0)->CycleCameraModeDownJustDown() && !CReplay::IsPlayingBack() &&
|
||||
(m_bLookingAtPlayer || WhoIsInControlOfTheCamera == CAMCONTROL_OBBE) &&
|
||||
!m_WideScreenOn)
|
||||
CarZoomIndicator += 1.0f;
|
||||
CarZoomIndicator++;
|
||||
if(!m_bFailedCullZoneTestPreviously){
|
||||
if(CarZoomIndicator < CAM_ZOOM_1STPRS) CarZoomIndicator = CAM_ZOOM_CINEMATIC;
|
||||
else if(CarZoomIndicator > CAM_ZOOM_CINEMATIC) CarZoomIndicator = CAM_ZOOM_1STPRS;
|
||||
@ -812,7 +812,7 @@ CCamera::CamControl(void)
|
||||
else
|
||||
PedZoomIndicator = CAM_ZOOM_TOPDOWN;
|
||||
}else
|
||||
PedZoomIndicator -= 1.0f;
|
||||
PedZoomIndicator--;
|
||||
}
|
||||
if(CPad::GetPad(0)->CycleCameraModeDownJustDown() && !CReplay::IsPlayingBack() &&
|
||||
(m_bLookingAtPlayer || WhoIsInControlOfTheCamera == CAMCONTROL_OBBE) &&
|
||||
@ -823,7 +823,7 @@ CCamera::CamControl(void)
|
||||
else
|
||||
PedZoomIndicator = CAM_ZOOM_TOPDOWN;
|
||||
}else
|
||||
PedZoomIndicator += 1.0f;
|
||||
PedZoomIndicator++;
|
||||
}
|
||||
// disabled obbe's cam here
|
||||
if(PedZoomIndicator < CAM_ZOOM_1) PedZoomIndicator = CAM_ZOOM_TOPDOWN;
|
||||
@ -1524,7 +1524,7 @@ CCamera::UpdateTargetEntity(void)
|
||||
cantOpen = false;
|
||||
|
||||
if(PLAYER->GetPedState() == PED_ENTER_CAR && !cantOpen){
|
||||
if(!enteringCar && CarZoomIndicator != 0.0f){
|
||||
if(!enteringCar && CarZoomIndicator != CAM_ZOOM_1STPRS){
|
||||
pTargetEntity = PLAYER->m_pMyVehicle;
|
||||
if(PLAYER->m_pMyVehicle == nil)
|
||||
pTargetEntity = PLAYER;
|
||||
@ -1532,7 +1532,7 @@ CCamera::UpdateTargetEntity(void)
|
||||
}
|
||||
|
||||
if((PLAYER->GetPedState() == PED_CARJACK || PLAYER->GetPedState() == PED_OPEN_DOOR) && !cantOpen){
|
||||
if(!enteringCar && CarZoomIndicator != 0.0f)
|
||||
if(!enteringCar && CarZoomIndicator != CAM_ZOOM_1STPRS)
|
||||
#ifdef GTA_PS2_STUFF
|
||||
// dunno if this has any amazing effects
|
||||
{
|
||||
@ -1549,7 +1549,7 @@ CCamera::UpdateTargetEntity(void)
|
||||
pTargetEntity = FindPlayerPed();
|
||||
if(PLAYER->GetPedState() == PED_DRAG_FROM_CAR)
|
||||
pTargetEntity = FindPlayerPed();
|
||||
if(pTargetEntity->IsVehicle() && CarZoomIndicator != 0.0f && FindPlayerPed()->GetPedState() == PED_ARRESTED)
|
||||
if(pTargetEntity->IsVehicle() && CarZoomIndicator != CAM_ZOOM_1STPRS && FindPlayerPed()->GetPedState() == PED_ARRESTED)
|
||||
pTargetEntity = FindPlayerPed();
|
||||
}
|
||||
}
|
||||
|
@ -16,12 +16,15 @@ enum
|
||||
};
|
||||
|
||||
#define DEFAULT_NEAR (0.9f)
|
||||
#define CAM_ZOOM_1STPRS (0.0f)
|
||||
#define CAM_ZOOM_1 (1.0f)
|
||||
#define CAM_ZOOM_2 (2.0f)
|
||||
#define CAM_ZOOM_3 (3.0f)
|
||||
#define CAM_ZOOM_TOPDOWN (4.0f)
|
||||
#define CAM_ZOOM_CINEMATIC (5.0f)
|
||||
enum
|
||||
{
|
||||
CAM_ZOOM_1STPRS,
|
||||
CAM_ZOOM_1,
|
||||
CAM_ZOOM_2,
|
||||
CAM_ZOOM_3,
|
||||
CAM_ZOOM_TOPDOWN,
|
||||
CAM_ZOOM_CINEMATIC,
|
||||
};
|
||||
|
||||
#ifdef FREE_CAM // LCS values
|
||||
#define FREE_CAR_ZOOM_VALUE_1 (-1.0f)
|
||||
@ -412,7 +415,11 @@ uint32 unknown; // some counter having to do with music
|
||||
|
||||
float CamFrontXNorm;
|
||||
float CamFrontYNorm;
|
||||
#if 0 // TODO: FIX_BUGS once GenericLoad is done
|
||||
int32 CarZoomIndicator;
|
||||
#else
|
||||
float CarZoomIndicator;
|
||||
#endif
|
||||
float CarZoomValue;
|
||||
float CarZoomValueSmooth;
|
||||
|
||||
@ -448,7 +455,11 @@ uint32 unknown; // some counter having to do with music
|
||||
float m_ScreenReductionSpeed;
|
||||
float m_AlphaForPlayerAnim1rstPerson;
|
||||
float Orientation;
|
||||
#if 0 // TODO: FIX_BUGS once GenericLoad is done
|
||||
int32 PedZoomIndicator;
|
||||
#else
|
||||
float PedZoomIndicator;
|
||||
#endif
|
||||
float PlayerExhaustion;
|
||||
float SoundDistUp, SoundDistLeft, SoundDistRight;
|
||||
float SoundDistUpAsRead, SoundDistLeftAsRead, SoundDistRightAsRead;
|
||||
|
Loading…
Reference in New Issue
Block a user