From ea3beddfec7ea1cabcd13ff1cb8348f03e829530 Mon Sep 17 00:00:00 2001 From: Sara Date: Sun, 18 Jun 2023 14:27:24 +0200 Subject: [PATCH] inverted correction collision_check --- src/corelib/world.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/corelib/world.c b/src/corelib/world.c index 4545b1e..fc15d77 100644 --- a/src/corelib/world.c +++ b/src/corelib/world.c @@ -210,11 +210,11 @@ void interpolate_move(object_t* object, float target_x, float target_y, float ma object_broadcast_collision(object, other); if(slide) { object->sprite.x = old_x; - if(_collision_check(other, object)) { + if(!_collision_check(other, object)) { object->sprite.x = new_x; } object->sprite.y = old_y; - if(_collision_check(other, object)) { + if(!_collision_check(other, object)) { object->sprite.y = new_y; } } else {