1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-23 21:07:17 +00:00

rogueviz::flocking:: do not try large steps even if delta way too big

This commit is contained in:
Zeno Rogue 2019-04-21 20:45:15 +02:00
parent 2c40216e06
commit 0509c82b54

View File

@ -99,8 +99,10 @@ namespace flocking {
int precision = 10;
void simulate(int delta) {
while(delta > precision && delta < 100 * precision) {
int iter = 0;
while(delta > precision && iter < 100) {
simulate(precision); delta -= precision;
iter++;
}
ld d = delta / 1000.;
using namespace hyperpoint_vec;