Browse Source

Fix possible teleport positiosn

There should only be 36 possible as 4 3x3 areas direciton N/E/S/W
pull/2742/head
Anders Jenbo 5 years ago
parent
commit
cb2831aae6
  1. 4
      Source/missiles.cpp

4
Source/missiles.cpp

@ -1830,12 +1830,12 @@ void AddRndTeleport(MissileStruct &missile, Point dst, Direction /*midir*/)
return;
}
std::array<Point, 13 * 13 - 7 * 7> targets;
std::array<Point, 4 * 9> targets;
int count = 0;
for (int y = -6; y <= 6; y++) {
for (int x = -6; x <= 6; x++) {
if (x >= -3 && x <= 3 && y >= -3 && y <= 3)
if ((x >= -3 && x <= 3) || (y >= -3 && y <= 3))
continue; // Skip center
Point target = missile.position.start + Displacement { x, y };

Loading…
Cancel
Save