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-861f7616d084master
parent
eba3731a93
commit
4884837ded
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue