From 4d5c4ef807ce9b53e7a8379628dbcf360eff2bc0 Mon Sep 17 00:00:00 2001 From: Alex Szpakowski Date: Sun, 14 Jan 2018 14:40:46 -0400 Subject: [PATCH] Fix Body:isTouching. --- src/modules/physics/box2d/Body.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/physics/box2d/Body.cpp b/src/modules/physics/box2d/Body.cpp index c755357a6..959a8c615 100644 --- a/src/modules/physics/box2d/Body.cpp +++ b/src/modules/physics/box2d/Body.cpp @@ -429,7 +429,7 @@ bool Body::isTouching(Body *other) const while (ce != nullptr) { - if (ce->other == otherbody) + if (ce->other == otherbody && ce->contact != nullptr && ce->contact->IsTouching()) return true; ce = ce->next;