mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-27 14:37:16 +00:00
rogueviz::flocking:: do not try large steps even if delta way too big
This commit is contained in:
parent
2c40216e06
commit
0509c82b54
@ -99,8 +99,10 @@ namespace flocking {
|
|||||||
int precision = 10;
|
int precision = 10;
|
||||||
|
|
||||||
void simulate(int delta) {
|
void simulate(int delta) {
|
||||||
while(delta > precision && delta < 100 * precision) {
|
int iter = 0;
|
||||||
|
while(delta > precision && iter < 100) {
|
||||||
simulate(precision); delta -= precision;
|
simulate(precision); delta -= precision;
|
||||||
|
iter++;
|
||||||
}
|
}
|
||||||
ld d = delta / 1000.;
|
ld d = delta / 1000.;
|
||||||
using namespace hyperpoint_vec;
|
using namespace hyperpoint_vec;
|
||||||
|
Loading…
Reference in New Issue
Block a user