X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=blobdiff_plain;f=hit_shape.cc;h=1663064fb72b023c4dc46f176d61b797db0055df;hb=ea2a7fd04689794d3fb266e2b73bedb10953abb4;hp=28b27780b406ebc197f81228a0bce5682a9c8d00;hpb=3caf13085a6ae1ae41d6f489c8b69206b0ffa48d;p=universe.git diff --git a/hit_shape.cc b/hit_shape.cc index 28b2778..1663064 100644 --- a/hit_shape.cc +++ b/hit_shape.cc @@ -8,7 +8,7 @@ class MoveSquare : public Task { - int _square_size; + scalar_t _square_size; int _nb_shapes; Polygon **_shapes; bool *_targets; @@ -73,7 +73,7 @@ public: if(manipulator->grabbing()) { for(int k = 0; k < _nb_shapes; k++) if(_shapes[k] == manipulator->grabbing()) { bool hit = _targets[k]; - if(hit & drand48() < 0.25) { + if(hit && (drand48() < 0.25)) { manipulator->force_release(); scramble(universe); return 1.0;