summaryrefslogtreecommitdiff
path: root/src/localplayer.h
diff options
context:
space:
mode:
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>2012-12-02 14:59:08 +0200
committerPerttu Ahola <celeron55@gmail.com>2012-12-02 20:22:02 +0200
commit15b86a6b9b4d32cc1213ebf8e1a2c12f56a83c16 (patch)
treedddc025113b03cda3ce0bb976c4a333956a47966 /src/localplayer.h
parenteeb0900291583c6d81656fbbd977fa74b1a733b6 (diff)
downloadminetest-15b86a6b9b4d32cc1213ebf8e1a2c12f56a83c16.tar.gz
minetest-15b86a6b9b4d32cc1213ebf8e1a2c12f56a83c16.tar.bz2
minetest-15b86a6b9b4d32cc1213ebf8e1a2c12f56a83c16.zip
Don't send player position from client to server if the player hasn't moved
Diffstat (limited to 'src/localplayer.h')
-rw-r--r--src/localplayer.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/localplayer.h b/src/localplayer.h
index 9d1829db8..c9d010d7c 100644
--- a/src/localplayer.h
+++ b/src/localplayer.h
@@ -44,6 +44,14 @@ public:
void applyControl(float dtime);
v3s16 getStandingNodePos();
+
+ // Used to check if anything changed and prevent sending packets if not
+ v3f last_position;
+ v3f last_speed;
+ float last_pitch;
+ float last_yaw;
+ unsigned int last_keyPressed;
+
private:
// This is used for determining the sneaking range
v3s16 m_sneak_node;