summaryrefslogtreecommitdiff
path: root/physics.c
diff options
context:
space:
mode:
Diffstat (limited to 'physics.c')
-rw-r--r--physics.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/physics.c b/physics.c
index 51f8999..94b15e8 100644
--- a/physics.c
+++ b/physics.c
@@ -47,10 +47,10 @@ entphysics(float delta)
}
}
- for(int j = i; j < ebufi; j++) {
+ for(int j = i; j >= 0; j--) {
Entity *f = entitybuffer + j;
- if(!f->active)
- break;
+ if(!f->active || f == e)
+ continue;
if(checkcollision(&e->body, &f->body)) {
EntityCollision cl;