From 865764b50eb97bf43f5b37fc212b79aceb809ffe Mon Sep 17 00:00:00 2001 From: esquizo Date: Thu, 30 Apr 2026 19:20:11 -0300 Subject: fix entity check loop on physics --- physics.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'physics.c') 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; -- cgit v1.2.3