From 3ed5755e527cfe56eb8f1e9958c54da3194fe9e7 Mon Sep 17 00:00:00 2001 From: Sara Date: Wed, 12 Jul 2023 02:07:08 +0200 Subject: [PATCH] physics.h no longer depends on g_objects being public, or WORLD_NUM_OBJECTS being constant --- src/corelib/physics.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/corelib/physics.c b/src/corelib/physics.c index 001348c..02890e3 100644 --- a/src/corelib/physics.c +++ b/src/corelib/physics.c @@ -191,9 +191,9 @@ void solve_collision_slide(object_t* left, object_t* right) { static inline void _solve_move(object_t* this) { // loop over all objects and check collision if applicable - for(int i = 0; i < WORLD_NUM_OBJECTS; ++i) { + for(int i = 0; i < world_num_objects(); ++i) { // get pointer to other object - object_t* other = g_objects + i; + object_t* other = world_get_object(i); // check collision, return if found if(can_collide(other) && this != other && _collision_check(other, this)) { object_broadcast_collision(other, this);