Index: src/map.h
===================================================================
--- src/map.h (revision 1356)
+++ src/map.h (working copy)
@@ -536,7 +536,7 @@
}
/**
- * Get X size of the world.
+ * Get X voxel size of the world.
* @return Length of the world in X direction.
*/
inline uint16 GetXSize() const
@@ -545,7 +545,7 @@
}
/**
- * Get Y size of the world.
+ * Get Y voxel size of the world.
* @return Length of the world in Y direction.
*/
inline uint16 GetYSize() const
@@ -578,8 +578,8 @@
void Load(Loader &ldr);
private:
- uint16 x_size; ///< Current max x size.
- uint16 y_size; ///< Current max y size.
+ uint16 x_size; ///< Current max x size (in voxels).
+ uint16 y_size; ///< Current max y size (in voxels).
VoxelStack stacks[WORLD_X_SIZE * WORLD_Y_SIZE]; ///< All voxel stacks in the world.
};
Index: src/person.cpp
===================================================================
--- src/person.cpp (revision 1356)
+++ src/person.cpp (working copy)
@@ -1063,10 +1063,7 @@
AnimateResult Guest::EdgeOfWorldOnAnimate()
{
/* If the guest ended up off-world, quit. */
- if (this->x_vox < 0 || this->x_vox >= _world.GetXSize() * 256 ||
- this->y_vox < 0 || this->y_vox >= _world.GetYSize() * 256) {
- return OAR_DEACTIVATE;
- }
+ if (!IsVoxelstackInsideWorld(this->x_vox, this->y_vox)) return OAR_DEACTIVATE;
/* If the guest arrived at the 'go home' tile while going home, quit. */
if (this->activity == GA_GO_HOME && this->x_vox == _guests.start_voxel.x && this->y_vox == _guests.start_voxel.y) {