🎨 Add missing braces
This commit is contained in:
parent
d392f70509
commit
aa290b6f63
4 changed files with 22 additions and 14 deletions
|
|
@ -1154,10 +1154,12 @@ void InitMonsters()
|
|||
if (!gbIsSpawn)
|
||||
PlaceUniques();
|
||||
na = 0;
|
||||
for (s = 16; s < 96; s++)
|
||||
for (t = 16; t < 96; t++)
|
||||
for (s = 16; s < 96; s++) {
|
||||
for (t = 16; t < 96; t++) {
|
||||
if (!SolidLoc(s, t))
|
||||
na++;
|
||||
}
|
||||
}
|
||||
numplacemonsters = na / 30;
|
||||
if (gbIsMultiplayer)
|
||||
numplacemonsters += numplacemonsters / 2;
|
||||
|
|
@ -2879,14 +2881,15 @@ bool M_CallWalk(int i, direction md)
|
|||
ok = ok || (md = left[mdtemp], DirOK(i, md)) || (md = right[mdtemp], DirOK(i, md));
|
||||
else
|
||||
ok = ok || (md = right[mdtemp], DirOK(i, md)) || (md = left[mdtemp], DirOK(i, md));
|
||||
if (GenerateRnd(2) != 0)
|
||||
if (GenerateRnd(2) != 0) {
|
||||
ok = ok
|
||||
|| (md = right[right[mdtemp]], DirOK(i, md))
|
||||
|| (md = left[left[mdtemp]], DirOK(i, md));
|
||||
else
|
||||
} else {
|
||||
ok = ok
|
||||
|| (md = left[left[mdtemp]], DirOK(i, md))
|
||||
|| (md = right[right[mdtemp]], DirOK(i, md));
|
||||
}
|
||||
if (ok)
|
||||
M_WalkDir(i, md);
|
||||
return ok;
|
||||
|
|
|
|||
|
|
@ -3462,10 +3462,9 @@ bool OperateShrineHidden(int pnum)
|
|||
while (true) {
|
||||
cnt = 0;
|
||||
for (auto &item : plr[pnum].InvBody) {
|
||||
if (!item.isEmpty())
|
||||
if (item._iMaxDur != DUR_INDESTRUCTIBLE
|
||||
&& item._iMaxDur != 0)
|
||||
cnt++;
|
||||
if (!item.isEmpty() && item._iMaxDur != DUR_INDESTRUCTIBLE && item._iMaxDur != 0) {
|
||||
cnt++;
|
||||
}
|
||||
}
|
||||
if (cnt == 0)
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -1663,16 +1663,21 @@ void RemovePlrFromMap(int pnum)
|
|||
pp = pnum + 1;
|
||||
pn = -(pnum + 1);
|
||||
|
||||
for (y = 1; y < MAXDUNY; y++)
|
||||
for (x = 1; x < MAXDUNX; x++)
|
||||
if (dPlayer[x][y - 1] == pn || dPlayer[x - 1][y] == pn)
|
||||
if (dFlags[x][y] & BFLAG_PLAYERLR)
|
||||
for (y = 1; y < MAXDUNY; y++) {
|
||||
for (x = 1; x < MAXDUNX; x++) {
|
||||
if (dPlayer[x][y - 1] == pn || dPlayer[x - 1][y] == pn) {
|
||||
if (dFlags[x][y] & BFLAG_PLAYERLR) {
|
||||
dFlags[x][y] &= ~BFLAG_PLAYERLR;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (y = 0; y < MAXDUNY; y++)
|
||||
for (y = 0; y < MAXDUNY; y++) {
|
||||
for (x = 0; x < MAXDUNX; x++)
|
||||
if (dPlayer[x][y] == pp || dPlayer[x][y] == pn)
|
||||
dPlayer[x][y] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void StartPlrHit(int pnum, int dam, bool forcehit)
|
||||
|
|
|
|||
|
|
@ -659,12 +659,13 @@ void ResyncQuests()
|
|||
return;
|
||||
|
||||
if (QuestStatus(Q_LTBANNER)) {
|
||||
if (quests[Q_LTBANNER]._qvar1 == 1)
|
||||
if (quests[Q_LTBANNER]._qvar1 == 1) {
|
||||
ObjChangeMapResync(
|
||||
setpc_w + setpc_x - 2,
|
||||
setpc_h + setpc_y - 2,
|
||||
setpc_w + setpc_x + 1,
|
||||
setpc_h + setpc_y + 1);
|
||||
}
|
||||
if (quests[Q_LTBANNER]._qvar1 == 2) {
|
||||
ObjChangeMapResync(
|
||||
setpc_w + setpc_x - 2,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue