mirror of
https://github.com/OpenDriver2/REDRIVER2.git
synced 2024-11-22 18:32:42 +01:00
- event camera offsets
- fix crash
This commit is contained in:
parent
657c9bb5d3
commit
0c27e05e4c
@ -73,6 +73,12 @@ void CalcCameraBasePos(_PLAYER* lp)
|
||||
basePos[1] = -event->position.vy;
|
||||
basePos[2] = event->position.vz;
|
||||
baseDir = event->rotation + 0x400U & 0xfff;
|
||||
|
||||
EventCameraOffset(&boxDisp); // [A]
|
||||
|
||||
basePos[0] += boxDisp.vx;
|
||||
basePos[1] += boxDisp.vy - gCameraOffset.vy;
|
||||
basePos[2] += boxDisp.vz;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -945,7 +951,8 @@ void PlaceCameraInCar(_PLAYER *lp, int BumperCam)
|
||||
if (cp == NULL)
|
||||
{
|
||||
viewer_position.vz = 0;
|
||||
viewer_position.vy = viewer_position.vy + 42 + lp->pPed->head_pos;
|
||||
if(lp->pPed)
|
||||
viewer_position.vy += lp->pPed->head_pos;
|
||||
}
|
||||
else if (cp->ap.carCos != NULL) // [A] prevent crash from happening
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user