summaryrefslogtreecommitdiffstats
path: root/src/World.h
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@outlook.com>2021-10-03 18:43:22 +0200
committerGitHub <noreply@github.com>2021-10-03 18:43:22 +0200
commit1e4850a6c5faed2d7906fe9d19ac327efefe7922 (patch)
treed9ddba00b1dade19ce695ea7d38ffe13cac62067 /src/World.h
parentProtocol 1.8: fix duplicated vector component in spawn packet (#5314) (diff)
downloadcuberite-1e4850a6c5faed2d7906fe9d19ac327efefe7922.tar
cuberite-1e4850a6c5faed2d7906fe9d19ac327efefe7922.tar.gz
cuberite-1e4850a6c5faed2d7906fe9d19ac327efefe7922.tar.bz2
cuberite-1e4850a6c5faed2d7906fe9d19ac327efefe7922.tar.lz
cuberite-1e4850a6c5faed2d7906fe9d19ac327efefe7922.tar.xz
cuberite-1e4850a6c5faed2d7906fe9d19ac327efefe7922.tar.zst
cuberite-1e4850a6c5faed2d7906fe9d19ac327efefe7922.zip
Diffstat (limited to '')
-rw-r--r--src/World.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/World.h b/src/World.h
index 71e23c463..eab6422f4 100644
--- a/src/World.h
+++ b/src/World.h
@@ -573,11 +573,11 @@ public:
/** Set default spawn at the given coordinates.
Returns false if the new spawn couldn't be stored in the INI file. */
- bool SetSpawn(double a_X, double a_Y, double a_Z);
+ bool SetSpawn(int a_X, int a_Y, int a_Z);
- double GetSpawnX(void) const { return m_SpawnX; }
- double GetSpawnY(void) const { return m_SpawnY; }
- double GetSpawnZ(void) const { return m_SpawnZ; }
+ int GetSpawnX(void) const { return m_SpawnX; }
+ int GetSpawnY(void) const { return m_SpawnY; }
+ int GetSpawnZ(void) const { return m_SpawnZ; }
/** Wakes up the simulators for the specified block */
virtual void WakeUpSimulators(Vector3i a_Block) override;
@@ -955,9 +955,9 @@ private:
eDimension m_Dimension;
bool m_IsSpawnExplicitlySet;
- double m_SpawnX;
- double m_SpawnY;
- double m_SpawnZ;
+ int m_SpawnX;
+ int m_SpawnY;
+ int m_SpawnZ;
// Variables defining the minimum and maximum size for a nether portal
int m_MinNetherPortalWidth;
@@ -1125,7 +1125,7 @@ private:
/** Can the specified coordinates be used as a spawn point?
Returns true if spawn position is valid and sets a_Y to the valid spawn height */
- bool CanSpawnAt(double a_X, double & a_Y, double a_Z);
+ bool CanSpawnAt(int a_X, int & a_Y, int a_Z);
/** Check if player starting point is acceptable */
bool CheckPlayerSpawnPoint(int a_PosX, int a_PosY, int a_PosZ);