mirror of
https://github.com/OpenDriver2/REDRIVER2.git
synced 2024-11-22 18:32:42 +01:00
- fix crash when switching camera to event in film director
This commit is contained in:
parent
238a121ec7
commit
d951422e95
@ -592,9 +592,9 @@ void PlaceCameraInCar(PLAYER *lp, int BumperCam)
|
|||||||
|
|
||||||
// [A] handle REDRIVER2 dedicated look back button
|
// [A] handle REDRIVER2 dedicated look back button
|
||||||
if ((paddCamera & CAMERA_PAD_LOOK_BACK) == CAMERA_PAD_LOOK_BACK || (paddCamera & CAMERA_PAD_LOOK_BACK_DED))
|
if ((paddCamera & CAMERA_PAD_LOOK_BACK) == CAMERA_PAD_LOOK_BACK || (paddCamera & CAMERA_PAD_LOOK_BACK_DED))
|
||||||
camera_angle.vy = 2048 - baseDir & 0xfff;
|
camera_angle.vy = 2048 - baseDir & 4095;
|
||||||
else
|
else
|
||||||
camera_angle.vy = (lp->headPos >> 16) - baseDir & 0xfff;
|
camera_angle.vy = (lp->headPos >> 16) - baseDir & 4095;
|
||||||
|
|
||||||
if (cp)
|
if (cp)
|
||||||
{
|
{
|
||||||
@ -632,13 +632,18 @@ void PlaceCameraInCar(PLAYER *lp, int BumperCam)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
LPPEDESTRIAN pPlayerPed;
|
||||||
|
pPlayerPed = lp->pPed;
|
||||||
|
|
||||||
camera_angle.vx = -tannerLookAngle.vx;
|
camera_angle.vx = -tannerLookAngle.vx;
|
||||||
|
|
||||||
// pedestrian camera is much simpler
|
|
||||||
BuildWorldMatrix();
|
BuildWorldMatrix();
|
||||||
|
|
||||||
viewer_position.vy += lp->pPed->head_pos - 25;
|
if (pPlayerPed)
|
||||||
//viewer_position.vz += 45;
|
{
|
||||||
|
// apply pedestrian bobbing
|
||||||
|
viewer_position.vy += pPlayerPed->head_pos - 25;
|
||||||
|
}
|
||||||
|
|
||||||
angle = -baseDir;
|
angle = -baseDir;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user