diff --git a/src/corelib/world.c b/src/corelib/world.c index 85fbed4..8a063e9 100644 --- a/src/corelib/world.c +++ b/src/corelib/world.c @@ -166,7 +166,7 @@ void update_collision() { } } -object_t* interpolate_move(object_t* object, float target_x, float target_y, float max_step_size) { +void interpolate_move(object_t* object, float target_x, float target_y, float max_step_size, int slide) { // calculate step delta float dx = target_x - object->sprite.x, dy = target_y - object->sprite.y; // calculate direction x,y @@ -179,7 +179,7 @@ object_t* interpolate_move(object_t* object, float target_x, float target_y, flo if(!_can_collide(object)) { object->sprite.x = target_x; object->sprite.y = target_y; - return NULL; + return; } /* @@ -208,11 +208,11 @@ object_t* interpolate_move(object_t* object, float target_x, float target_y, flo object_broadcast_collision(object, other); object->sprite.x = old_x; object->sprite.y = old_y; - return other; + return; } } } // no collision, return nothing - return NULL; + return; } diff --git a/src/corelib/world.h b/src/corelib/world.h index 2c57f31..27de091 100644 --- a/src/corelib/world.h +++ b/src/corelib/world.h @@ -62,6 +62,6 @@ void draw_objects(); void update_collision(); -object_t* interpolate_move(object_t* object, float target_x, float target_y, float max_step_size); +void interpolate_move(object_t* object, float target_x, float target_y, float max_step_size, int slide); #endif /* _world_h */