Loading

Paste #p5a0uaqgk

  1. Index: src/map.h
  2. ===================================================================
  3. --- src/map.h   (revision 1356)
  4. +++ src/map.h   (working copy)
  5. @@ -536,7 +536,7 @@
  6.         }
  7.  
  8.         /**
  9. -        * Get X size of the world.
  10. +        * Get X voxel size of the world.
  11.          * @return Length of the world in X direction.
  12.          */
  13.         inline uint16 GetXSize() const
  14. @@ -545,7 +545,7 @@
  15.         }
  16.  
  17.         /**
  18. -        * Get Y size of the world.
  19. +        * Get Y voxel size of the world.
  20.          * @return Length of the world in Y direction.
  21.          */
  22.         inline uint16 GetYSize() const
  23. @@ -578,8 +578,8 @@
  24.         void Load(Loader &ldr);
  25.  
  26.  private:
  27. -       uint16 x_size; ///< Current max x size.
  28. -       uint16 y_size; ///< Current max y size.
  29. +       uint16 x_size; ///< Current max x size (in voxels).
  30. +       uint16 y_size; ///< Current max y size (in voxels).
  31.  
  32.         VoxelStack stacks[WORLD_X_SIZE * WORLD_Y_SIZE]; ///< All voxel stacks in the world.
  33.  };
  34. Index: src/person.cpp
  35. ===================================================================
  36. --- src/person.cpp      (revision 1356)
  37. +++ src/person.cpp      (working copy)
  38. @@ -1063,10 +1063,7 @@
  39.  AnimateResult Guest::EdgeOfWorldOnAnimate()
  40.  {
  41.         /* If the guest ended up off-world, quit. */
  42. -       if (this->x_vox < 0 || this->x_vox >= _world.GetXSize() * 256 ||
  43. -                       this->y_vox < 0 || this->y_vox >= _world.GetYSize() * 256) {
  44. -               return OAR_DEACTIVATE;
  45. -       }
  46. +       if (!IsVoxelstackInsideWorld(this->x_vox, this->y_vox)) return OAR_DEACTIVATE;
  47.  
  48.         /* If the guest arrived at the 'go home' tile while going home, quit. */
  49.         if (this->activity == GA_GO_HOME && this->x_vox == _guests.start_voxel.x && this->y_vox == _guests.start_voxel.y) {

Comments