|
|
|
|
@ -1,4 +1,7 @@
|
|
|
|
|
#ifndef SPAWN |
|
|
|
|
|
|
|
|
|
#include <algorithm> |
|
|
|
|
|
|
|
|
|
#include "diablo.h" |
|
|
|
|
|
|
|
|
|
DEVILUTION_BEGIN_NAMESPACE |
|
|
|
|
@ -792,8 +795,8 @@ static void DRLG_L3Pool()
|
|
|
|
|
found = TRUE; |
|
|
|
|
} |
|
|
|
|
poolchance = random_(0, 100); |
|
|
|
|
for (j = (duny - totarea > 0 ? duny - totarea : 0); j < (duny + totarea < DMAXY ? duny + totarea : DMAXY); j++) { |
|
|
|
|
for (i = (dunx - totarea > 0 ? dunx - totarea : 0); i < (dunx + totarea < DMAXY ? dunx + totarea : DMAXY); i++) { |
|
|
|
|
for (j = std::max(duny - totarea, 0); j < std::min(duny + totarea, DMAXY); j++) { |
|
|
|
|
for (i = std::max(dunx - totarea, 0); i < std::min(dunx + totarea, DMAXX); i++) { |
|
|
|
|
// BUGFIX: In the following swap the order to first do the
|
|
|
|
|
// index checks and only then access dungeon[i][j] (fixed)
|
|
|
|
|
if (dungeon[i][j] & 0x80) { |
|
|
|
|
|