Fixed drop out of flyers or ships.
This commit is contained in:
parent
e8888e2969
commit
330f770f0e
1 changed files with 20 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue