diff --git a/src/main/java/cactusServer/models/CollisionManager.java b/src/main/java/cactusServer/models/CollisionManager.java index 46495a8..8bffff6 100644 --- a/src/main/java/cactusServer/models/CollisionManager.java +++ b/src/main/java/cactusServer/models/CollisionManager.java @@ -131,12 +131,10 @@ Map bulletMap = playersBulletsEntry.getValue(); for (Map.Entry bulletEntry : bulletMap.entrySet()) { Bullet bullet = bulletEntry.getValue(); - if (!bullet.isAlive()) - continue; + if (!bullet.isAlive()) continue; String bulletId = bulletEntry.getKey(); collisionBulletAndPlayers(instanceId, instance, bulletOwnerPlayerId, bulletId, bullet); - if (!bullet.isAlive()) - continue; + if (!bullet.isAlive()) continue; collisionBulletAndObjects(instance, bulletOwnerPlayerId, bulletId, bullet); } } @@ -179,13 +177,11 @@ for (int i = 0; i < allBulletsEntryList.size() - 1; i++) { Map.Entry bulletEntry1 = allBulletsEntryList.get(i); Bullet bullet1 = bulletEntry1.getValue(); - if (!bullet1.isAlive()) - continue; + if (!bullet1.isAlive()) continue; for (int j = i + 1; j < allBulletsEntryList.size(); j++) { Map.Entry bulletEntry2 = allBulletsEntryList.get(j); Bullet bullet2 = bulletEntry2.getValue(); - if (!bullet2.isAlive()) - continue; + if (!bullet2.isAlive()) continue; if (isCollision(bullet1, bullet2)) { bullet1.setAlive(false); bullet2.setAlive(false);