Fix the warcam (pressing space) that broke in r3130, and remove an unused variable + add a newline to the end of a file to make the code compile

with -Werror again.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3366 4a71c877-e1ca-e34f-864e-861f7616d084
master
Gerard Krol 2008-01-05 21:04:03 +00:00
parent 939cc99b56
commit 629d7aab3c
3 changed files with 10 additions and 6 deletions

View File

@ -7464,7 +7464,7 @@ BOOL scrMapRevealedInRange(void)
/* Returns true if a certain map tile was revealed, ie fog of war was removed */
BOOL scrMapTileVisible(void)
{
SDWORD tileX,tileY,wRange,player;
SDWORD tileX,tileY,player;
if (!stackPopParams(3, VAL_INT, &tileX, VAL_INT, &tileY, VAL_INT, &player))
{

View File

@ -1026,14 +1026,18 @@ static void updateCameraRotationAcceleration( UBYTE update )
trackingCamera.rotation.x+=DEG(360);
}
worldAngle = trackingCamera.rotation.x;
separation = fmodf(xConcern - worldAngle, DEG(360));
separation = xConcern - worldAngle;
// Make sure that rotations larger than 180 degrees are noted
// in the range of -180 - 0 degrees.
if (separation > DEG(180))
// Make sure that rotations are noted
// in the range of -180 - 180 degrees.
while (separation > DEG(180))
{
separation -= DEG(360);
}
while (separation < -DEG(180))
{
separation += DEG(360);
}
/* Make new acceleration */
trackingCamera.rotAccel.x =