1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Fix anticheat

This commit is contained in:
Perttu Ahola 2013-08-03 23:16:37 +03:00
parent bc5db9b027
commit 742614180c
5 changed files with 146 additions and 70 deletions

View file

@ -304,6 +304,9 @@ public:
bool line_of_sight(v3f pos1, v3f pos2, float stepsize=1.0);
u32 getGameTime() { return m_game_time; }
void reportMaxLagEstimate(float f) { m_max_lag_estimate = f; }
float getMaxLagEstimate() { return m_max_lag_estimate; }
private:
/*
@ -378,6 +381,9 @@ private:
std::list<ABMWithState> m_abms;
// An interval for generally sending object positions and stuff
float m_recommended_send_interval;
// Estimate for general maximum lag as determined by server.
// Can raise to high values like 15s with eg. map generation mods.
float m_max_lag_estimate;
};
#ifndef SERVER