mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Don't send player position from client to server if the player hasn't moved
This commit is contained in:
parent
eeb0900291
commit
15b86a6b9b
4 changed files with 30 additions and 3 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue