inverted correction collision_check
parent
dff8e8304d
commit
ea3beddfec
|
@ -210,11 +210,11 @@ void interpolate_move(object_t* object, float target_x, float target_y, float ma
|
||||||
object_broadcast_collision(object, other);
|
object_broadcast_collision(object, other);
|
||||||
if(slide) {
|
if(slide) {
|
||||||
object->sprite.x = old_x;
|
object->sprite.x = old_x;
|
||||||
if(_collision_check(other, object)) {
|
if(!_collision_check(other, object)) {
|
||||||
object->sprite.x = new_x;
|
object->sprite.x = new_x;
|
||||||
}
|
}
|
||||||
object->sprite.y = old_y;
|
object->sprite.y = old_y;
|
||||||
if(_collision_check(other, object)) {
|
if(!_collision_check(other, object)) {
|
||||||
object->sprite.y = new_y;
|
object->sprite.y = new_y;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue