1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-01-23 15:36:59 +00:00

rogueviz::flocking:: fixed a bug in inital setup occuring sometimes

This commit is contained in:
Zeno Rogue 2021-04-07 14:49:06 +02:00
parent 0bfeca4256
commit ab3bb1b378

View File

@ -502,6 +502,7 @@ namespace flocking {
vertexdata& vd = vdata[i]; vertexdata& vd = vdata[i];
// set initial base and at to random cell and random position there // set initial base and at to random cell and random position there
createViz(i, v[hrand(isize(v))], Id); createViz(i, v[hrand(isize(v))], Id);
vd.m->pat.T = Id;
rotate_object(vd.m->pat.T, vd.m->ori, random_spin()); rotate_object(vd.m->pat.T, vd.m->ori, random_spin());
apply_parallel_transport(vd.m->pat.T, vd.m->ori, xtangent(hrandf() / 2)); apply_parallel_transport(vd.m->pat.T, vd.m->ori, xtangent(hrandf() / 2));
rotate_object(vd.m->pat.T, vd.m->ori, random_spin()); rotate_object(vd.m->pat.T, vd.m->ori, random_spin());