summaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorLars Hofhansl <larsh@apache.org>2018-01-12 23:47:39 -0800
committerLars Hofhansl <larsh@apache.org>2018-01-12 23:47:39 -0800
commitfad263dec9e1fa7ae0886f768e22d8ee74e8553b (patch)
tree1d6ede8d2b9a77ebd90545a0ba38f0785c85b23d /src/util
parent7e50529867d4ad0e405f0d850a3d2a1a08d0121b (diff)
downloadminetest-fad263dec9e1fa7ae0886f768e22d8ee74e8553b.tar.gz
minetest-fad263dec9e1fa7ae0886f768e22d8ee74e8553b.tar.bz2
minetest-fad263dec9e1fa7ae0886f768e22d8ee74e8553b.zip
Revert "Add an active object step time budget #6721"
This reverts commit 9c669016d1578a5c62f932c6ccb7a2b4b1e21f0a. See #6907
Diffstat (limited to 'src/util')
-rw-r--r--src/util/numeric.h10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/util/numeric.h b/src/util/numeric.h
index ff4d89ec4..f7df19ca9 100644
--- a/src/util/numeric.h
+++ b/src/util/numeric.h
@@ -230,7 +230,7 @@ inline u32 calc_parity(u32 v)
u64 murmur_hash_64_ua(const void *key, int len, unsigned int seed);
bool isBlockInSight(v3s16 blockpos_b, v3f camera_pos, v3f camera_dir,
- f32 camera_fov, f32 range, f32 *distance_ptr = NULL);
+ f32 camera_fov, f32 range, f32 *distance_ptr=NULL);
s16 adjustDist(s16 dist, float zoom_fov);
@@ -302,24 +302,18 @@ public:
return value:
true: action should be skipped
false: action should be done
- if passed, the elapsed time since this method last returned true
- is written to elapsed_ptr
*/
- bool step(float dtime, float wanted_interval, float *elapsed_ptr = NULL)
+ bool step(float dtime, float wanted_interval)
{
m_accumulator += dtime;
- if (elapsed_ptr)
- *elapsed_ptr = m_accumulator - m_last_accumulator;
if (m_accumulator < wanted_interval)
return false;
m_accumulator -= wanted_interval;
- m_last_accumulator = m_accumulator;
return true;
}
private:
float m_accumulator = 0.0f;
- float m_last_accumulator = 0.0f;
};