tmp
This commit is contained in:
@@ -85,7 +85,8 @@ void World::UpdateMap() {
|
|||||||
//request empty regions within this zone
|
//request empty regions within this zone
|
||||||
for (int i = xStart; i <= xEnd; i += REGION_WIDTH) {
|
for (int i = xStart; i <= xEnd; i += REGION_WIDTH) {
|
||||||
for (int j = yStart; j <= yEnd; j += REGION_HEIGHT) {
|
for (int j = yStart; j <= yEnd; j += REGION_HEIGHT) {
|
||||||
if (!regionPager.FindRegion(i, j)) {
|
Region* region = regionPager.FindRegion(i, j);
|
||||||
|
if (!region || debugRegionSum(region) == 0) {
|
||||||
SendRegionRequest(roomIndex, i, j);
|
SendRegionRequest(roomIndex, i, j);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ Region* RegionPagerBase::FindRegion(int x, int y) {
|
|||||||
Region* RegionPagerBase::PushRegion(Region* const ptr) {
|
Region* RegionPagerBase::PushRegion(Region* const ptr) {
|
||||||
//BUG: Lists seem to not work properly
|
//BUG: Lists seem to not work properly
|
||||||
regionList.push_front(*ptr);
|
regionList.push_front(*ptr);
|
||||||
if (debugRegionSum(®ionList.front())) {
|
if (debugRegionSum(®ionList.front()) == 0) {
|
||||||
throw(std::runtime_error("Checksum fail; RegionPagerBase::PushRegion()"));
|
throw(std::runtime_error("Checksum fail; RegionPagerBase::PushRegion()"));
|
||||||
}
|
}
|
||||||
return ®ionList.front();
|
return ®ionList.front();
|
||||||
|
|||||||
Reference in New Issue
Block a user