Ravioli, Ravioli give me the collisioni

This commit is contained in:
Armin Benz 2017-04-30 19:58:06 +02:00
parent d3491b1c7d
commit 359ed979ce

View File

@ -67,6 +67,8 @@ public abstract class MovingEntity extends CRGameEntity {
}
}
if (getFirstCollision() != null) return true; // collision but movement AND correction failed
bounds.x = next.x;
return collided;
}
@ -112,6 +114,8 @@ public abstract class MovingEntity extends CRGameEntity {
}
}
if (getFirstCollision() != null) return true; // collision but movement AND correction failed
bounds.y = next.y;
return collided;
}
@ -150,7 +154,7 @@ public abstract class MovingEntity extends CRGameEntity {
if (ent2 == this) continue;
if (overlaps(next, ent2.bounds) && ent2.canCollide(false, this)) {
Gdx.app.log("Entity Hitbox", "Expand failed X- || WTF");
Gdx.app.log("Entity Hitbox", "Expand failed X-");
return false;
}
}
@ -223,7 +227,7 @@ public abstract class MovingEntity extends CRGameEntity {
if (ent2 == this) continue;
if (overlaps(next, ent2.bounds) && ent2.canCollide(false, this)) {
Gdx.app.log("Entity Hitbox", "Expand failed Y- || WTF");
Gdx.app.log("Entity Hitbox", "Expand failed Y-");
return false;
}
}