Skip to content

Commit

Permalink
moved up a short circuit
Browse files Browse the repository at this point in the history
  • Loading branch information
Pomax committed Jun 26, 2012
1 parent 47622a9 commit b8aba93
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CollisionDetection.pde
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ static class CollisionDetection {
*/
static void interact(Boundary b, Actor a)
{
if (a.remove) return;
float[] correction = blocks(b,a);
if(correction != null) {
a.attachTo(b, correction);
Expand All @@ -28,7 +29,6 @@ static class CollisionDetection {
*/
static float[] blocks(Boundary b, Actor a)
{
if (a.remove) return null;
float[] current = a.getBoundingBox(),
previous = a.previous.getBoundingBox(),
line = {b.x, b.y, b.xw, b.yh};
Expand Down

0 comments on commit b8aba93

Please sign in to comment.