mirror of
https://github.com/OpenDriver2/REDRIVER2.git
synced 2024-11-22 10:22:48 +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
|
||||
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
|
||||
camera_angle.vy = (lp->headPos >> 16) - baseDir & 0xfff;
|
||||
camera_angle.vy = (lp->headPos >> 16) - baseDir & 4095;
|
||||
|
||||
if (cp)
|
||||
{
|
||||
@ -632,13 +632,18 @@ void PlaceCameraInCar(PLAYER *lp, int BumperCam)
|
||||
}
|
||||
else
|
||||
{
|
||||
LPPEDESTRIAN pPlayerPed;
|
||||
pPlayerPed = lp->pPed;
|
||||
|
||||
camera_angle.vx = -tannerLookAngle.vx;
|
||||
|
||||
// pedestrian camera is much simpler
|
||||
BuildWorldMatrix();
|
||||
|
||||
viewer_position.vy += lp->pPed->head_pos - 25;
|
||||
//viewer_position.vz += 45;
|
||||
if (pPlayerPed)
|
||||
{
|
||||
// apply pedestrian bobbing
|
||||
viewer_position.vy += pPlayerPed->head_pos - 25;
|
||||
}
|
||||
|
||||
angle = -baseDir;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user