summaryrefslogtreecommitdiffstats
path: root/src/ClientHandle.h
diff options
context:
space:
mode:
authorLogicParrot <LogicParrot@users.noreply.github.com>2016-04-04 13:53:46 +0200
committerLogicParrot <LogicParrot@users.noreply.github.com>2016-04-04 13:53:46 +0200
commitb4a6edc958fbb011e2d7edda514c394e012b4721 (patch)
treea5111ba75442f299bdbb892e4adc73e9522a1f7e /src/ClientHandle.h
parentMerge pull request #3118 from LogicParrot/fixWorld (diff)
parentPlayers never fall through unloaded chunks or end up inside solids on teleport (diff)
downloadcuberite-b4a6edc958fbb011e2d7edda514c394e012b4721.tar
cuberite-b4a6edc958fbb011e2d7edda514c394e012b4721.tar.gz
cuberite-b4a6edc958fbb011e2d7edda514c394e012b4721.tar.bz2
cuberite-b4a6edc958fbb011e2d7edda514c394e012b4721.tar.lz
cuberite-b4a6edc958fbb011e2d7edda514c394e012b4721.tar.xz
cuberite-b4a6edc958fbb011e2d7edda514c394e012b4721.tar.zst
cuberite-b4a6edc958fbb011e2d7edda514c394e012b4721.zip
Diffstat (limited to 'src/ClientHandle.h')
-rw-r--r--src/ClientHandle.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/ClientHandle.h b/src/ClientHandle.h
index 899b0a5ab..123d1b057 100644
--- a/src/ClientHandle.h
+++ b/src/ClientHandle.h
@@ -363,6 +363,8 @@ public: // tolua_export
/** Returns the protocol version number of the protocol that the client is talking. Returns zero if the protocol version is not (yet) known. */
UInt32 GetProtocolVersion(void) const { return m_ProtocolVersion; } // tolua_export
+ void InvalidateCachedSentChunk();
+
private:
friend class cServer; // Needs access to SetSelf()
@@ -408,6 +410,13 @@ private:
cPlayer * m_Player;
+ /** This is an optimization which saves you an iteration of m_SentChunks if you just want to know
+ whether or not the player is standing at a sent chunk.
+ If this is equal to the coordinates of the chunk the player is currrently standing at, then this must be a sent chunk
+ and a member of m_SentChunks.
+ Otherwise, this contains an arbitrary value which should not be used. */
+ cChunkCoords m_CachedSentChunk;
+
bool m_HasSentDC; ///< True if a Disconnect packet has been sent in either direction
// Chunk position when the last StreamChunks() was called; used to avoid re-streaming while in the same chunk