Updated the map system & APIs

This commit is contained in:
Kayne Ruse
2014-12-31 06:01:03 +11:00
parent 8e50be24d4
commit 6704944105
11 changed files with 116 additions and 38 deletions
+3 -1
View File
@@ -501,7 +501,9 @@ void InWorld::SendRegionRequest(int roomIndex, int x, int y) {
void InWorld::HandleRegionContent(RegionPacket* const argPacket) {
//replace existing regions
regionPager.UnloadRegion(argPacket->x, argPacket->y);
regionPager.UnloadIf([&](Region const& region) -> bool {
return region.GetX() == argPacket->x && region.GetY() == argPacket->y;
});
regionPager.PushRegion(argPacket->region);
//clean up after the serial code