| 1810 | } |
| 1811 | |
| 1812 | double Tile::getCreatureSpeedDefault(const Creature* creature) const |
| 1813 | { |
| 1814 | // If we are on a full tile, we set the speed to ground speed. That can happen |
| 1815 | // on client side if there is a desynchro between server and client and the |
| 1816 | // creature is not exactly on the same tile |
| 1817 | if(!getIsOnServerMap() && isFullTile()) |
| 1818 | return creature->getMoveSpeedGround(); |
| 1819 | |
| 1820 | switch(getTileVisual()) |
| 1821 | { |
| 1822 | case TileVisual::dirtGround: |
| 1823 | case TileVisual::goldGround: |
| 1824 | case TileVisual::rockGround: |
| 1825 | case TileVisual::claimedGround: |
| 1826 | return creature->getMoveSpeedGround(); |
| 1827 | case TileVisual::waterGround: |
| 1828 | return creature->getMoveSpeedWater(); |
| 1829 | case TileVisual::lavaGround: |
| 1830 | return creature->getMoveSpeedLava(); |
| 1831 | default: |
| 1832 | return 0.0; |
| 1833 | } |
| 1834 | } |
| 1835 | |
| 1836 | bool Tile::canWorkerClaim(const Creature& worker) |
| 1837 | { |
no test coverage detected