diff --git a/src/unit/unit.cpp b/src/unit/unit.cpp index cdf8e1e22..15c61b2e8 100644 --- a/src/unit/unit.cpp +++ b/src/unit/unit.cpp @@ -1199,6 +1199,11 @@ global void DropOutOnSide(Unit* unit,int heading,int addx,int addy) for( ;; ) { startw: for( i=addy; i--; y++ ) { +#ifdef NEW_SHIPS + if( unit->Type->UnitType!=UnitTypeLand && ((x&1) || (y&1)) ) { + continue; + } +#endif if( CheckedCanMoveToMask(x,y,mask) ) { goto found; } @@ -1206,6 +1211,11 @@ startw: ++addx; starts: for( i=addx; i--; x++ ) { +#ifdef NEW_SHIPS + if( unit->Type->UnitType!=UnitTypeLand && ((x&1) || (y&1)) ) { + continue; + } +#endif if( CheckedCanMoveToMask(x,y,mask) ) { goto found; } @@ -1213,6 +1223,11 @@ starts: ++addy; starte: for( i=addy; i--; y-- ) { +#ifdef NEW_SHIPS + if( unit->Type->UnitType!=UnitTypeLand && ((x&1) || (y&1)) ) { + continue; + } +#endif if( CheckedCanMoveToMask(x,y,mask) ) { goto found; } @@ -1220,6 +1235,11 @@ starte: ++addx; startn: for( i=addx; i--; x-- ) { +#ifdef NEW_SHIPS + if( unit->Type->UnitType!=UnitTypeLand && ((x&1) || (y&1)) ) { + continue; + } +#endif if( CheckedCanMoveToMask(x,y,mask) ) { goto found; }