Relax camera movement while still preventing clipping through the terrain. Also disable panning to the default angle when releasing the

right mouse button.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3067 4a71c877-e1ca-e34f-864e-861f7616d084
master
Gerard Krol 2007-12-15 23:33:24 +00:00
parent eba3731a93
commit 4884837ded
4 changed files with 12 additions and 6 deletions

View File

@ -191,8 +191,14 @@ extern BOOL getRotActive( void );
extern SDWORD getDesiredPitch( void );
extern void setDesiredPitch(SDWORD pitch);
#define MAX_PLAYER_X_ANGLE (-14)
#define MIN_PLAYER_X_ANGLE (-50)
#define MAX_PLAYER_X_ANGLE (-1)
#define MIN_PLAYER_X_ANGLE (-60)
#define MAXDISTANCE (3500)
#define MINDISTANCE (500)
#define START_DISTANCE (1500)
#define CAMERA_PIVOT_HEIGHT (500)
#define HIDDEN_FRONTEND_WIDTH (640)
#define HIDDEN_FRONTEND_HEIGHT (480)

View File

@ -389,7 +389,7 @@ void draw3DScene( void )
{
/* Move the autonomous camera if necessary */
calcAverageTerrainHeight(&player);
trackHeight(2 * averageCentreTerrainHeight);
trackHeight(averageCentreTerrainHeight+CAMERA_PIVOT_HEIGHT);
}
else
{
@ -4012,6 +4012,7 @@ static void trackHeight( float desiredHeight )
/* Adjust the height accordingly */
player.p.y += heightSpeed * fraction;
#if 0
/* Now do auto pitch as well, but only if we're not using mouselook and not tracking */
if(!getWarCamStatus() && !getRotActive())
{
@ -4037,6 +4038,7 @@ static void trackHeight( float desiredHeight )
player.r.x += aSpeed * fraction;
}
}
#endif
}

View File

@ -22,6 +22,7 @@
#ifndef _display3d_h
#define _display3d_h
#include "display.h"
#include "display3ddef.h" // This should be the only place including this file
#include "lib/ivis_common/pietypes.h"
#include "lib/ivis_common/piedef.h"

View File

@ -36,8 +36,5 @@
#define LAND_XGRD (VISIBLE_XTILES + 1)
#define LAND_YGRD (VISIBLE_YTILES + 1)
#define MAXDISTANCE (4500)
#define MINDISTANCE (1500)
#define START_DISTANCE (2500)
#endif