ULTIMA1: Fix returning to overworld from cities & castles

This commit is contained in:
Paul Gilbert
2020-02-01 13:13:51 -08:00
committed by Paul Gilbert
parent ee7e87d021
commit 0ce4d68d04
+1 -2
View File
@@ -48,7 +48,7 @@ uint TransportOnFoot::getTileNum() const {
void TransportOnFoot::moveTo(const Point &destPos, Shared::Direction dir) {
Transport::moveTo(destPos, dir);
Map::Ultima1Map::MapBase *map = getMap();
Shared::Map *map = getGame()->getMap();
if (destPos.x < 0 || destPos.y < 0 || destPos.x >= (int)map->width() || destPos.y >= (int)map->height()) {
// Handling for leaving locations by walking off the edge of the map
@@ -57,7 +57,6 @@ void TransportOnFoot::moveTo(const Point &destPos, Shared::Direction dir) {
// Load the overworld map
map->load(Map::MAP_OVERWORLD);
map->setPosition(destPos);
}
}