Browse Source

Fix hacky workaround in PlaceGroup

pull/876/head
galaxyhaxz 7 years ago committed by Anders Jenbo
parent
commit
498adcfbbf
  1. 16
      Source/monster.cpp

16
Source/monster.cpp

@ -872,22 +872,14 @@ void PlaceGroup(int mtype, int num, int leaderf, int leader)
dMonster[monster[nummonsters]._mx][monster[nummonsters]._my] = 0; dMonster[monster[nummonsters]._mx][monster[nummonsters]._my] = 0;
} }
x1 = 0;
y1 = 0;
xp = 0;
yp = 0;
if (leaderf & 1) { if (leaderf & 1) {
int offset = random(92, 8); int offset = random(92, 8);
xp = monster[leader]._mx + offset_x[offset]; x1 = xp = monster[leader]._mx + offset_x[offset];
yp = monster[leader]._my + offset_y[offset]; y1 = yp = monster[leader]._my + offset_y[offset];
x1 = xp;
y1 = yp;
} else { } else {
do { do {
xp = random(93, 80) + 16; x1 = xp = random(93, 80) + 16;
x1 = xp; y1 = yp = random(93, 80) + 16;
yp = random(93, 80) + 16;
y1 = yp;
} while (!MonstPlace(xp, yp)); } while (!MonstPlace(xp, yp));
} }

Loading…
Cancel
Save