Index: src/display.c
===================================================================
--- src/display.c	(revision 2942)
+++ src/display.c	(working copy)
@@ -2241,6 +2241,8 @@
 		}
 		else		// clicked on a destination.
 		{
+			MAPTILE *psTile = mapTile(mouseTileX, mouseTileY);
+
 			/* Otherwise send them all */
 			orderSelectedLoc(selectedPlayer, mouseTileX*TILE_UNITS+TILE_UNITS/2,mouseTileY*TILE_UNITS+TILE_UNITS/2);
 			if(getNumDroidsSelected())
@@ -2252,9 +2254,10 @@
 			if(godMode && (mouseTileX >= 0) && (mouseTileX < (SDWORD)mapWidth) &&
 				(mouseTileY >= 0) && (mouseTileY < (SDWORD)mapHeight))
 			{
-				DBCONPRINTF(ConsoleString,(ConsoleString,"Tile Coords : %d,%d (%d,%d) Zone :%d", mouseTileX,mouseTileY,
+				DBCONPRINTF(ConsoleString,(ConsoleString,"Tile Coords : %d,%d (%d,%d) Zone :%d Normal(%f, %f, %f)", mouseTileX,mouseTileY,
 					mouseTileX*TILE_UNITS + TILE_UNITS/2, mouseTileY*TILE_UNITS + TILE_UNITS/2,
-					gwGetZone(mouseTileX, mouseTileY)));
+					gwGetZone(mouseTileX, mouseTileY),
+					(double)psTile->normal.x / FP12_MULTIPLIER, (double)psTile->normal.y / FP12_MULTIPLIER, (double)psTile->normal.z / FP12_MULTIPLIER));
 			}
 
 			//addConsoleMessage("Droid ordered to new location",DEFAULT_JUSTIFY);
Index: src/display3d.c
===================================================================
--- src/display3d.c	(revision 2945)
+++ src/display3d.c	(working copy)
@@ -491,7 +491,6 @@
 static void drawTiles(iView *camera, iView *player)
 {
 	UDWORD i, j;
-	MAPTILE *psTile;
 	BOOL bWaterTile = FALSE;
 	BOOL PushedDown = FALSE;
 	UBYTE TileIllum;
@@ -582,13 +581,16 @@
 				tileScreenInfo[i][j].v = 0;
 				tileScreenInfo[i][j].light.argb = 0;
 				tileScreenInfo[i][j].specular.argb = 0;
+				tileScreenInfo[i][j].normal.x = 0.0f;
+				tileScreenInfo[i][j].normal.y = 0.0f;
+				tileScreenInfo[i][j].normal.z = 1.0f;
 			}
 			else
 			{
 				BOOL bEdgeTile;
+				/* Get a pointer to the tile at this location */
+				MAPTILE *psTile = mapTile(playerXTile + j, playerZTile + i);
 
-				/* Get a pointer to the tile at this location */
-				psTile = mapTile(playerXTile + j, playerZTile + i);
 				if (terrainType(psTile) == TER_WATER)
 				{
 					tileScreenInfo[i][j].bWater = TRUE;
@@ -600,6 +602,10 @@
 					bWaterTile = FALSE;
 				}
 
+				tileScreenInfo[i][j].normal.x = (double)psTile->normal.x / FP12_MULTIPLIER;
+				tileScreenInfo[i][j].normal.y = (double)psTile->normal.y / FP12_MULTIPLIER;
+				tileScreenInfo[i][j].normal.z = (double)psTile->normal.z / FP12_MULTIPLIER;
+
 				tileScreenInfo[i][j].pos.y = map_TileHeight(playerXTile + j, playerZTile + i);
 
 				/* Is it in the centre and therefore worth averaging height over? */
Index: src/lighting.c
===================================================================
--- src/lighting.c	(revision 2942)
+++ src/lighting.c	(working copy)
@@ -57,6 +57,7 @@
 static void colourTile(SDWORD xIndex, SDWORD yIndex, LIGHT_COLOUR colour, UBYTE percent);
 static void normalsOnTile(UDWORD tileX, UDWORD tileY, UDWORD quadrant);
 static UDWORD calcDistToTile(UDWORD tileX, UDWORD tileY, Vector3i *pos);
+static void calcTileIllum(MAPTILE *psTile, UDWORD tileX, UDWORD tileY);
 
 static UDWORD	numNormals;		// How many normals have we got?
 static Vector3i normals[8];		// Maximum 8 possible normals
@@ -75,7 +76,6 @@
 void initLighting(UDWORD x1, UDWORD y1, UDWORD x2, UDWORD y2)
 {
 	UDWORD       i, j;
-	MAPTILE	    *psTile;
 
 	// quick check not trying to go off the map - don't need to check for < 0 since UWORD's!!
 	if (x1 > mapWidth || x2 > mapWidth || y1 > mapHeight || y2 > mapHeight)
@@ -88,7 +88,8 @@
 	{
 		for(j = y1; j < y2; j++)
 		{
-			psTile = mapTile(i, j);
+			MAPTILE *psTile = mapTile(i, j);
+
 			// always make the edge tiles dark
 			if (i==0 || j==0 || i >= mapWidth-1 || j >= mapHeight-1)
 			{
@@ -102,7 +103,7 @@
 			}
 			else
 			{
-				calcTileIllum(i,j);
+				calcTileIllum(psTile, i, j);
 			}
 			// Basically darkens down the tiles that are outside the scroll
 			// limits - thereby emphasising the cannot-go-there-ness of them
@@ -115,10 +116,8 @@
 	}
 }
 
-
-void	calcTileIllum(UDWORD tileX, UDWORD tileY)
+static void calcTileIllum(MAPTILE *psTile, UDWORD tileX, UDWORD tileY)
 {
-	Vector3i finalVector;
 	SDWORD	dotProduct;
 	UDWORD	i;
 	UDWORD	val;
@@ -151,21 +150,22 @@
 	/* Do quadrant 3 - tile that's down and left*/
 	normalsOnTile(tileX-1,tileY,3);
 
-	/* The number or normals that we got is in numNormals*/
-	finalVector.x = finalVector.y = finalVector.z = 0;
+	psTile->normal.x = 0;
+	psTile->normal.y = 0;
+	psTile->normal.z = 0;
 
 	for(i=0; i<numNormals; i++)
 	{
-		finalVector.x += normals[i].x;
-		finalVector.y += normals[i].y;
-		finalVector.z += normals[i].z;
+		psTile->normal.x += normals[i].x;
+		psTile->normal.y += normals[i].y;
+		psTile->normal.z += normals[i].z;
 	}
-	pie_VectorNormalise3iv(&finalVector);
+	pie_VectorNormalise3iv(&psTile->normal);
 	pie_VectorNormalise3fv(&theSun);
 
-	dotProduct =	(finalVector.x * theSun.x +
-			 finalVector.y * theSun.y +
-			 finalVector.z * theSun.z) / FP12_MULTIPLIER;
+	dotProduct =	(psTile->normal.x * theSun.x +
+			 psTile->normal.y * theSun.y +
+			 psTile->normal.z * theSun.z) / FP12_MULTIPLIER;
 
 	val = ((abs(dotProduct)) / 16);
 	if (val == 0) val = 1;
Index: src/lighting.h
===================================================================
--- src/lighting.h	(revision 2942)
+++ src/lighting.h	(working copy)
@@ -50,7 +50,6 @@
 //extern void	initLighting( void );
 extern void initLighting(UDWORD x1, UDWORD y1, UDWORD x2, UDWORD y2);
 extern void	lightValueForTile(UDWORD tileX, UDWORD tileY);
-extern void	calcTileIllum(UDWORD tileX, UDWORD tileY);
 extern void	doBuildingLights( void );
 extern void UpdateFogDistance(float distance);
 extern UDWORD	lightDoFogAndIllumination(UBYTE brightness, SDWORD dx, SDWORD dz, UDWORD* pSpecular);
Index: src/map.h
===================================================================
--- src/map.h	(revision 2942)
+++ src/map.h	(working copy)
@@ -132,6 +132,7 @@
 	UBYTE			level;
 	UBYTE			inRange;		// sensor range display.
 	BASE_OBJECT		*psObject;		// Any object sitting on the location (e.g. building)
+	Vector3i		normal;
 
 //	TYPE_OF_TERRAIN	type;			// The terrain type for the tile
 } MAPTILE;
Index: lib/ivis_common/piedef.h
===================================================================
--- lib/ivis_common/piedef.h	(revision 2942)
+++ lib/ivis_common/piedef.h	(working copy)
@@ -126,6 +126,7 @@
 	Vector3i pos;
 	unsigned int u, v;
 	PIELIGHT light, specular;
+	Vector3f normal;
 	Vector3i screen; //! Screenspace tile coordinates
 	Vector3i water; //! Screenspace water coordinates
 	int water_height; //! Worldspace water height
Index: lib/ivis_opengl/piedraw.c
===================================================================
--- lib/ivis_opengl/piedraw.c	(revision 2942)
+++ lib/ivis_opengl/piedraw.c	(working copy)
@@ -51,6 +51,7 @@
 static GLubyte aColour[COLOUR_COMPONENTS * MAP_VERTICES];
 static GLfloat aTexCoord[TEXCOORD_COMPONENTS * MAP_VERTICES];
 static GLfloat aVertex[VERTEX_COMPONENTS * MAP_VERTICES];
+static GLfloat aNormal[VERTEX_COMPONENTS * MAP_VERTICES];
 
 extern BOOL drawing_interface;
 
@@ -163,7 +164,7 @@
 	glLightfv(GL_LIGHT0, GL_SPECULAR, specular);
 	glEnable(GL_LIGHT0);
 
-//	lighting = TRUE;
+	lighting = TRUE;
 	shadows = TRUE;
 }
 
@@ -981,9 +982,11 @@
 {
 	glEnableClientState(GL_COLOR_ARRAY);
 	glEnableClientState(GL_VERTEX_ARRAY);
+	glEnableClientState(GL_NORMAL_ARRAY);
 	glEnableClientState(GL_TEXTURE_COORD_ARRAY);
 	glColorPointer(COLOUR_COMPONENTS, GL_UNSIGNED_BYTE, 0, aColour);
 	glTexCoordPointer(TEXCOORD_COMPONENTS, GL_FLOAT, 0, aTexCoord);
+	glNormalPointer(GL_FLOAT, 0, aNormal);
 	glVertexPointer(VERTEX_COMPONENTS, GL_FLOAT, 0, aVertex);
 }
 
@@ -993,6 +996,7 @@
 	glDisableClientState(GL_COLOR_ARRAY);
 	glDisableClientState(GL_VERTEX_ARRAY);
 	glDisableClientState(GL_TEXTURE_COORD_ARRAY);
+	glDisableClientState(GL_NORMAL_ARRAY);
 }
 
 // index gives us the triangle
@@ -1012,6 +1016,9 @@
 		aColour[j * COLOUR_COMPONENTS + 3] = aVrts[i].light.byte.a;
 		aTexCoord[j * TEXCOORD_COMPONENTS + 0] = aVrts[i].u;
 		aTexCoord[j * TEXCOORD_COMPONENTS + 1] = aVrts[i].v;
+		aNormal[j * VERTEX_COMPONENTS + 0] = aVrts[i].normal.x;
+		aNormal[j * VERTEX_COMPONENTS + 1] = aVrts[i].normal.y;
+		aNormal[j * VERTEX_COMPONENTS + 2] = aVrts[i].normal.z;
 		aVertex[j * VERTEX_COMPONENTS + 0] = aVrts[i].pos.x;
 		aVertex[j * VERTEX_COMPONENTS + 1] = aVrts[i].pos.y;
 		aVertex[j * VERTEX_COMPONENTS + 2] = aVrts[i].pos.z;
