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);