diff options
author | Perttu Ahola <celeron55@gmail.com> | 2013-08-03 23:16:37 +0300 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2013-08-03 23:16:37 +0300 |
commit | 742614180cbbe598694a48bd9eb6f7b97a762243 (patch) | |
tree | 5b5033b1d719911ae863ca99d304ebdcca3220f2 /src/environment.h | |
parent | bc5db9b0273d43fffad93cf67cf2bfdb714441a9 (diff) | |
download | minetest-742614180cbbe598694a48bd9eb6f7b97a762243.tar.gz minetest-742614180cbbe598694a48bd9eb6f7b97a762243.tar.bz2 minetest-742614180cbbe598694a48bd9eb6f7b97a762243.zip |
Fix anticheat
Diffstat (limited to 'src/environment.h')
-rw-r--r-- | src/environment.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/environment.h b/src/environment.h index 8fc5611e4..b59ce83c1 100644 --- a/src/environment.h +++ b/src/environment.h @@ -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 |