From 766774bc531be5f3c6d06905cb2c368addcb78fd Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Thu, 19 Aug 2021 22:56:44 +0200 Subject: [PATCH] Use loops to spawn needed golems --- Source/monster.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/Source/monster.cpp b/Source/monster.cpp index 37013fe2d..fad75aa96 100644 --- a/Source/monster.cpp +++ b/Source/monster.cpp @@ -3831,10 +3831,8 @@ void monster_some_crypt() void InitMonsters() { if (!setlevel) { - AddMonster(GolemHoldingCell, DIR_S, 0, false); - AddMonster(GolemHoldingCell, DIR_S, 0, false); - AddMonster(GolemHoldingCell, DIR_S, 0, false); - AddMonster(GolemHoldingCell, DIR_S, 0, false); + for (int i = 0; i < MAX_PLRS; i++) + AddMonster(GolemHoldingCell, DIR_S, 0, false); } if (!gbIsSpawn && !setlevel && currlevel == 16) @@ -3897,10 +3895,9 @@ void InitMonsters() void SetMapMonsters(const uint16_t *dunData, Point startPosition) { AddMonsterType(MT_GOLEM, PLACE_SPECIAL); - AddMonster(GolemHoldingCell, DIR_S, 0, false); - AddMonster(GolemHoldingCell, DIR_S, 0, false); - AddMonster(GolemHoldingCell, DIR_S, 0, false); - AddMonster(GolemHoldingCell, DIR_S, 0, false); + for (int i = 0; i < MAX_PLRS; i++) + AddMonster(GolemHoldingCell, DIR_S, 0, false); + if (setlevel && setlvlnum == SL_VILEBETRAYER) { AddMonsterType(UniqMonst[UMT_LAZARUS].mtype, PLACE_UNIQUE); AddMonsterType(UniqMonst[UMT_RED_VEX].mtype, PLACE_UNIQUE);