mirror of
https://github.com/halpz/re3.git
synced 2025-07-15 23:28:15 +00:00
Merge remote-tracking branch 'origin/master' into miami
# Conflicts: # src/control/Script.cpp # src/core/Cam.cpp # src/core/Camera.cpp # src/core/Camera.h # src/render/Fluff.cpp # src/render/Hud.cpp
This commit is contained in:
100
src/core/Cam.cpp
100
src/core/Cam.cpp
@ -244,10 +244,18 @@ CCam::Process(void)
|
||||
case MODE_PLAYER_FALLEN_WATER:
|
||||
Process_Player_Fallen_Water(CameraTarget, TargetOrientation, SpeedVar, TargetSpeedVar);
|
||||
break;
|
||||
// case MODE_CAM_ON_TRAIN_ROOF:
|
||||
// case MODE_CAM_RUNNING_SIDE_TRAIN:
|
||||
// case MODE_BLOOD_ON_THE_TRACKS:
|
||||
// case MODE_IM_THE_PASSENGER_WOOWOO:
|
||||
/* case MODE_CAM_ON_TRAIN_ROOF:
|
||||
Process_Cam_On_Train_Roof(CameraTarget, TargetOrientation, SpeedVar, TargetSpeedVar);
|
||||
break;
|
||||
case MODE_CAM_RUNNING_SIDE_TRAIN:
|
||||
Process_Cam_Running_Side_Train(CameraTarget, TargetOrientation, SpeedVar, TargetSpeedVar);
|
||||
break;
|
||||
case MODE_BLOOD_ON_THE_TRACKS:
|
||||
Process_Blood_On_The_Tracks(CameraTarget, TargetOrientation, SpeedVar, TargetSpeedVar);
|
||||
break;
|
||||
case MODE_IM_THE_PASSENGER_WOOWOO:
|
||||
Process_Im_The_Passenger_Woo_Woo(CameraTarget, TargetOrientation, SpeedVar, TargetSpeedVar);
|
||||
break;*/
|
||||
case MODE_SYPHON_CRIM_IN_FRONT:
|
||||
Process_Syphon_Crim_In_Front(CameraTarget, TargetOrientation, SpeedVar, TargetSpeedVar);
|
||||
break;
|
||||
@ -2742,7 +2750,7 @@ CCam::Process_1rstPersonPedOnPC(const CVector&, float TargetOrientation, float,
|
||||
while(Beta >= PI) Beta -= 2*PI;
|
||||
while(Beta < -PI) Beta += 2*PI;
|
||||
if(Alpha > DEGTORAD(60.0f)) Alpha = DEGTORAD(60.0f);
|
||||
if(Alpha < -DEGTORAD(89.5f)) Alpha = -DEGTORAD(89.5f);
|
||||
else if(Alpha < -DEGTORAD(89.5f)) Alpha = -DEGTORAD(89.5f);
|
||||
|
||||
TargetCoors.x = 3.0f * Cos(Alpha) * Cos(Beta) + Source.x;
|
||||
TargetCoors.y = 3.0f * Cos(Alpha) * Sin(Beta) + Source.y;
|
||||
@ -4316,6 +4324,88 @@ CCam::ProcessArrestCamTwo(void)
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
CCam::Process_Im_The_Passenger_Woo_Woo(const CVector &CameraTarget, float TargetOrientation, float, float)
|
||||
{
|
||||
FOV = 50.0f;
|
||||
|
||||
Source = CamTargetEntity->GetPosition();
|
||||
Source.z += 2.5f;
|
||||
Front = CamTargetEntity->GetForward();
|
||||
Front.Normalise();
|
||||
Source += 1.35f*Front;
|
||||
float heading = CGeneral::GetATanOfXY(Front.x, Front.y) + DEGTORAD(45.0f);
|
||||
Front.x = Cos(heading);
|
||||
Front.y = Sin(heading);
|
||||
Up = CamTargetEntity->GetUp();
|
||||
|
||||
GetVectorsReadyForRW();
|
||||
}
|
||||
|
||||
void
|
||||
CCam::Process_Blood_On_The_Tracks(const CVector &CameraTarget, float TargetOrientation, float, float)
|
||||
{
|
||||
FOV = 50.0f;
|
||||
|
||||
Source = CamTargetEntity->GetPosition();
|
||||
Source.z += 5.45f;
|
||||
|
||||
static CVector Test = -CamTargetEntity->GetForward();
|
||||
#ifdef FIX_BUGS
|
||||
if(ResetStatics){
|
||||
Test = -CamTargetEntity->GetForward();
|
||||
ResetStatics = false;
|
||||
}
|
||||
#endif
|
||||
|
||||
Source.x += 19.45*Test.x;
|
||||
Source.y += 19.45*Test.y;
|
||||
Front = Test;
|
||||
Front.Normalise();
|
||||
Up = CamTargetEntity->GetUp();
|
||||
|
||||
GetVectorsReadyForRW();
|
||||
}
|
||||
|
||||
void
|
||||
CCam::Process_Cam_Running_Side_Train(const CVector &CameraTarget, float TargetOrientation, float, float)
|
||||
{
|
||||
FOV = 60.0f;
|
||||
|
||||
Source = CamTargetEntity->GetPosition();
|
||||
Source.z += 4.0f;
|
||||
CVector fwd = CamTargetEntity->GetForward();
|
||||
float heading = CGeneral::GetATanOfXY(fwd.x, fwd.y) - DEGTORAD(15.0f);
|
||||
Source.x -= Cos(heading)*10.0f;
|
||||
Source.y -= Sin(heading)*10.0f;
|
||||
heading -= DEGTORAD(5.0f);
|
||||
Front = fwd;
|
||||
Front.x += Cos(heading);
|
||||
Front.y += Sin(heading);
|
||||
Front.z -= 0.056f;
|
||||
Front.Normalise();
|
||||
Up = CamTargetEntity->GetUp();
|
||||
|
||||
GetVectorsReadyForRW();
|
||||
}
|
||||
|
||||
void
|
||||
CCam::Process_Cam_On_Train_Roof(const CVector &CameraTarget, float TargetOrientation, float, float)
|
||||
{
|
||||
static float RoofMultiplier = 1.5f;
|
||||
|
||||
Source = CamTargetEntity->GetPosition();
|
||||
Source.z += 4.8f;
|
||||
Front = CamTargetEntity->GetForward();
|
||||
Front.Normalise();
|
||||
Source += Front*RoofMultiplier;
|
||||
Up = CamTargetEntity->GetUp();
|
||||
Up.Normalise();
|
||||
|
||||
GetVectorsReadyForRW();
|
||||
}
|
||||
|
||||
|
||||
#ifdef FREE_CAM
|
||||
void
|
||||
CCam::Process_FollowPed_Rotation(const CVector &CameraTarget, float TargetOrientation, float, float)
|
||||
|
@ -2974,6 +2974,13 @@ CCamera::Process_Train_Camera_Control(void)
|
||||
if(node >= m_uiNumberOfTrainCamNodes)
|
||||
node = 0;
|
||||
}
|
||||
#ifdef FIX_BUGS
|
||||
// Not really a bug but be nice and respect the debug mode
|
||||
if(DebugCamMode){
|
||||
TakeControl(target, DebugCamMode, JUMP_CUT, CAMCONTROL_SCRIPT);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
if(found){
|
||||
SetWideScreenOn();
|
||||
|
@ -240,6 +240,11 @@ public:
|
||||
bool GetLookFromLampPostPos(CEntity *Target, CPed *Cop, CVector &TargetCoors, CVector &SourceOut);
|
||||
bool GetLookOverShoulderPos(CEntity *Target, CPed *Cop, CVector &TargetCoors, CVector &SourceOut);
|
||||
|
||||
void Process_Im_The_Passenger_Woo_Woo(const CVector& CameraTarget, float TargetOrientation, float, float);
|
||||
void Process_Blood_On_The_Tracks(const CVector& CameraTarget, float TargetOrientation, float, float);
|
||||
void Process_Cam_Running_Side_Train(const CVector& CameraTarget, float TargetOrientation, float, float);
|
||||
void Process_Cam_On_Train_Roof(const CVector& CameraTarget, float TargetOrientation, float, float);
|
||||
|
||||
// custom stuff
|
||||
void Process_FollowPed_Rotation(const CVector &CameraTarget, float TargetOrientation, float, float);
|
||||
void Process_FollowCar_SA(const CVector &CameraTarget, float TargetOrientation, float, float);
|
||||
|
@ -941,7 +941,7 @@ CWorld::TestSphereAgainstSectorList(CPtrList &list, CVector spherePos, float rad
|
||||
|
||||
if(e != entityToIgnore && e->bUsesCollision &&
|
||||
!(ignoreSomeObjects && CameraToIgnoreThisObject(e))) {
|
||||
CVector diff = spherePos - e->GetPosition();
|
||||
CVector diff = spherePos - e->GetBoundCentre();
|
||||
float distance = diff.Magnitude();
|
||||
|
||||
if(e->GetBoundRadius() + radius > distance) {
|
||||
|
Reference in New Issue
Block a user