Air unit flying height above water

For flying above water  we use the maps water height + airHeight  if it
is higher than the normal height..
This commit is contained in:
titiger 2021-01-17 20:20:31 +01:00
parent c7c18bd506
commit bbd7df55c9
1 changed files with 4 additions and 0 deletions

View File

@ -3773,6 +3773,10 @@ float Unit::computeHeight(const Vec2i &pos) const {
}
}
}
// for flying above water we use the water height + airHeight if it is higher than the normal height..
if( map->getWaterLevel()+airHeight>height) {
height=map->getWaterLevel()+airHeight;
}
}
return height;