Make sure the camera distance is also initialised when loading a save
game that has the camera position and rotation (but not distance!) (version >=11). Not doing this caused the scroll code to move the player position to a corner of the map. Why the scroll code was trying to scroll is another question. git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3698 4a71c877-e1ca-e34f-864e-861f7616d084master
parent
1c36113b65
commit
029b827ec1
|
@ -898,6 +898,9 @@ BOOL init3DView(void)
|
|||
targetInitialise();
|
||||
|
||||
pie_PrepareSkybox(skyboxPageName);
|
||||
|
||||
// distance is not saved, so initialise it now
|
||||
distance = START_DISTANCE; // distance
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -909,7 +912,7 @@ void disp3d_setView(iView *newView)
|
|||
memcpy(&player,newView,sizeof(iView));
|
||||
}
|
||||
|
||||
// reset the camera rotation
|
||||
// reset the camera rotation (used for save games <= 10)
|
||||
void disp3d_resetView()
|
||||
{
|
||||
player.r.z = 0; // roll
|
||||
|
@ -917,7 +920,6 @@ void disp3d_resetView()
|
|||
player.r.x = DEG(360 + INITIAL_STARTING_PITCH); // angle
|
||||
|
||||
// and set the camera position
|
||||
distance = START_DISTANCE; // distance
|
||||
player.p.y = START_HEIGHT; // height
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue