X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=hit_shape.cc;h=189cadcf27c512a8a780f2f4b87e484bd3c9a0a1;hb=2e613b166590300fdc80bb324903ded4a0cb0403;hp=28b27780b406ebc197f81228a0bce5682a9c8d00;hpb=53885334edba4b9d3c4ee6d10fbfdd7e8a30d73b;p=universe.git diff --git a/hit_shape.cc b/hit_shape.cc index 28b2778..189cadc 100644 --- a/hit_shape.cc +++ b/hit_shape.cc @@ -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;