mirror of
https://git.rip/DMCA_FUCKER/re3.git
synced 2024-11-06 00:45:55 +00:00
some free cam fixes for controller
This commit is contained in:
parent
7a730384ef
commit
b5c09965a9
|
@ -5066,6 +5066,13 @@ CCam::Process_FollowCar_SA(const CVector& CameraTarget, float TargetOrientation,
|
|||
float stickX = -(pad->GetCarGunLeftRight());
|
||||
float stickY = pad->GetCarGunUpDown();
|
||||
|
||||
// In SA this checks for m_bUseMouse3rdPerson so num2 / num8 do not move camera
|
||||
// when Keyboard & Mouse controls are used. To make it work better with III/VC, check for actual pad state instead
|
||||
if (!CPad::IsAffectedByController && !isCar)
|
||||
stickY = 0.0f;
|
||||
else if (CPad::bInvertLook4Pad)
|
||||
stickY = -stickY;
|
||||
|
||||
if (CCamera::m_bUseMouse3rdPerson)
|
||||
stickY = 0.0f;
|
||||
|
||||
|
|
|
@ -1039,7 +1039,12 @@ CAutomobile::ProcessControl(void)
|
|||
if (GetModelIndex() == MI_RCRAIDER || GetModelIndex() == MI_RCGOBLIN)
|
||||
FlyingControl(FLIGHT_MODEL_RCHELI);
|
||||
else if (m_nWheelsOnGround < 4 && !(GetModelIndex() == MI_SEASPAR && bTouchingWater) ||
|
||||
CPad::GetPad(0)->GetAccelerate() != 0 || CPad::GetPad(0)->GetCarGunUpDown() > 1.0f ||
|
||||
CPad::GetPad(0)->GetAccelerate() != 0 ||
|
||||
#ifndef FREE_CAM
|
||||
CPad::GetPad(0)->GetCarGunUpDown() > 1.0f ||
|
||||
#else
|
||||
((!CCamera::bFreeCam || (CCamera::bFreeCam && !CPad::IsAffectedByController)) && CPad::GetPad(0)->GetCarGunUpDown() > 1.0f) ||
|
||||
#endif
|
||||
Abs(m_vecMoveSpeed.x) > 0.02f ||
|
||||
Abs(m_vecMoveSpeed.y) > 0.02f ||
|
||||
Abs(m_vecMoveSpeed.z) > 0.02f)
|
||||
|
|
|
@ -1844,7 +1844,12 @@ CBike::ProcessControlInputs(uint8 pad)
|
|||
m_fSteerInput = clamp(m_fSteerInput, -1.0f, 1.0f);
|
||||
|
||||
// Lean forward/backward
|
||||
float updown = -CPad::GetPad(pad)->GetSteeringUpDown()/128.0f + CPad::GetPad(pad)->GetCarGunUpDown()/128.0f;
|
||||
float updown;
|
||||
#ifdef FREE_CAM
|
||||
if (CCamera::bFreeCam) updown = CPad::IsAffectedByController ? -CPad::GetPad(pad)->GetSteeringUpDown()/128.0f : CPad::GetPad(pad)->GetCarGunUpDown()/128.0f;
|
||||
else
|
||||
#endif
|
||||
updown = -CPad::GetPad(pad)->GetSteeringUpDown()/128.0f + CPad::GetPad(pad)->GetCarGunUpDown()/128.0f;
|
||||
m_fLeanInput += (updown - m_fLeanInput)*0.2f*CTimer::GetTimeStep();
|
||||
m_fLeanInput = clamp(m_fLeanInput, -1.0f, 1.0f);
|
||||
|
||||
|
|
|
@ -965,7 +965,14 @@ CBoat::PreRender(void)
|
|||
// FIX: Planes can also be controlled with GetCarGunUpDown
|
||||
#ifdef FIX_BUGS
|
||||
static float steeringUpDown = 0.0f;
|
||||
steeringUpDown += ((Abs(CPad::GetPad(0)->GetCarGunUpDown()) > 1.0f ? (-CPad::GetPad(0)->GetCarGunUpDown() / 128.0f) : (-CPad::GetPad(0)->GetSteeringUpDown() / 128.0f)) - steeringUpDown) * Min(1.f, CTimer::GetTimeStep() / 5.f);
|
||||
#ifdef FREE_CAM
|
||||
if(!CCamera::bFreeCam || (CCamera::bFreeCam && !CPad::IsAffectedByController))
|
||||
#endif
|
||||
steeringUpDown += ((Abs(CPad::GetPad(0)->GetCarGunUpDown()) > 1.0f ? (-CPad::GetPad(0)->GetCarGunUpDown()/128.0f) : (-CPad::GetPad(0)->GetSteeringUpDown()/128.0f)) - steeringUpDown) * Min(1.f, CTimer::GetTimeStep()/5.f);
|
||||
#ifdef FREE_CAM
|
||||
else
|
||||
steeringUpDown = -CPad::GetPad(0)->GetSteeringUpDown()/128.0f;
|
||||
#endif
|
||||
#else
|
||||
float steeringUpDown = -CPad::GetPad(0)->GetSteeringUpDown()/128.0f;
|
||||
#endif
|
||||
|
|
|
@ -332,6 +332,9 @@ CVehicle::FlyingControl(eFlightModel flightModel)
|
|||
float fSteerLR = CPad::GetPad(0)->GetSteeringLeftRight() / 128.0f;
|
||||
float fSteerUD = -CPad::GetPad(0)->GetSteeringUpDown() / 128.0f;
|
||||
float fGunUD = Abs(CPad::GetPad(0)->GetCarGunUpDown());
|
||||
#ifdef FREE_CAM
|
||||
if(!CCamera::bFreeCam || (CCamera::bFreeCam && !CPad::IsAffectedByController))
|
||||
#endif
|
||||
if(fGunUD > 1.0f)
|
||||
fSteerUD = -CPad::GetPad(0)->GetCarGunUpDown() / 128.0f;
|
||||
|
||||
|
@ -505,9 +508,15 @@ CVehicle::FlyingControl(eFlightModel flightModel)
|
|||
fYaw = CPad::GetPad(0)->GetLookRight();
|
||||
if (CPad::GetPad(0)->GetLookLeft())
|
||||
fYaw = -1.0f;
|
||||
#ifdef FREE_CAM
|
||||
if (!CCamera::bFreeCam || (CCamera::bFreeCam && !CPad::IsAffectedByController))
|
||||
#endif
|
||||
if(Abs(CPad::GetPad(0)->GetCarGunLeftRight()) > 1.0f)
|
||||
fYaw = CPad::GetPad(0)->GetCarGunLeftRight() / 128.0f;
|
||||
}
|
||||
#ifdef FREE_CAM
|
||||
if(!CCamera::bFreeCam || (CCamera::bFreeCam && !CPad::IsAffectedByController))
|
||||
#endif
|
||||
if(Abs(CPad::GetPad(0)->GetCarGunUpDown()) > 1.0f)
|
||||
fPitch = -CPad::GetPad(0)->GetCarGunUpDown() / 128.0f;
|
||||
if (CPad::GetPad(0)->GetHorn()) {
|
||||
|
|
Loading…
Reference in a new issue