From 2f934e45af1f1f2d62dfe765159862c61f80f236 Mon Sep 17 00:00:00 2001
From: johns <>
Date: Mon, 19 Feb 2001 10:08:19 +0000
Subject: [PATCH] Added support for original ships/flyers movement.

---
 src/ui/mouse.cpp | 29 ++++++++++++++++++++++++++++-
 1 file changed, 28 insertions(+), 1 deletion(-)

diff --git a/src/ui/mouse.cpp b/src/ui/mouse.cpp
index 410af8660..5d3828bd5 100644
--- a/src/ui/mouse.cpp
+++ b/src/ui/mouse.cpp
@@ -186,7 +186,6 @@ global void DoRightButton(int x,int y)
         //      Worker of human or orcs
         //
         if( action==MouseActionHarvest ) {
-            DebugLevel3("Action %x\n",TheMap.ActionMap[x+y*TheMap.Width]);
             if( type==UnitTypeOrcWorkerWithWood
                     || type==UnitTypeHumanWorkerWithWood
                     || type==UnitTypeOrcWorkerWithGold
@@ -279,6 +278,12 @@ global void DoRightButton(int x,int y)
                 }
             }
 
+#ifdef NEW_SHIPS
+	    if( unit->Type->UnitType!=UnitTypeLand ) {
+		x&=~1;
+		y&=~1;			// Ships could only even fields
+	    }
+#endif
             SendCommandMove(unit,x,y,flush);
             continue;
         }
@@ -315,6 +320,13 @@ global void DoRightButton(int x,int y)
                 }
             }
 
+#ifdef NEW_SHIPS
+	    if( unit->Type->UnitType!=UnitTypeLand ) {
+		x&=~1;
+		y&=~1;			// Ships could only even fields
+	    }
+#endif
+
 	    // empty space
 	    if( RightButtonAttacks ) {
 		SendCommandAttack(unit,x,y,NoUnitP,flush);
@@ -331,6 +343,21 @@ global void DoRightButton(int x,int y)
 	if( action==MouseActionMove ) {
 	}
 
+        //
+        //      Ships
+        //
+#ifdef NEW_SHIPS
+	if( action==MouseActionSail ) {
+	    x&=~1;
+	    y&=~1;			// Ships could only even fields
+	}
+	if( unit->Type->UnitType!=UnitTypeLand ) {
+	    x&=~1;
+	    y&=~1;			// Ships could only even fields
+	}
+#endif
+
+
 //	    if( !unit->Type->Building ) {
 	SendCommandMove(unit,x,y,flush);
 //	    }