Resolved bug #45

This commit is contained in:
2015-08-24 14:26:32 +10:00
parent 540f646209
commit 37fadc6567
+8 -2
View File
@@ -34,7 +34,10 @@ Region::type_t RegionPagerBase::SetTile(int x, int y, int z, Region::type_t v) {
} }
Region::type_t RegionPagerBase::GetTile(int x, int y, int z) { Region::type_t RegionPagerBase::GetTile(int x, int y, int z) {
Region* ptr = GetRegion(x, y); Region* ptr = FindRegion(x, y);
if (!ptr) {
return 0;
}
return ptr->GetTile(x - ptr->GetX(), y - ptr->GetY(), z); return ptr->GetTile(x - ptr->GetX(), y - ptr->GetY(), z);
} }
@@ -44,7 +47,10 @@ bool RegionPagerBase::SetSolid(int x, int y, int b) {
} }
bool RegionPagerBase::GetSolid(int x, int y) { bool RegionPagerBase::GetSolid(int x, int y) {
Region* ptr = GetRegion(x, y); Region* ptr = FindRegion(x, y);
if (!ptr) {
return 0;
}
return ptr->GetSolid(x - ptr->GetX(), y - ptr->GetY()); return ptr->GetSolid(x - ptr->GetX(), y - ptr->GetY());
} }