From 742614180cbbe598694a48bd9eb6f7b97a762243 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Sat, 3 Aug 2013 23:16:37 +0300 Subject: Fix anticheat --- src/environment.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/environment.h') 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 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 -- cgit v1.2.3