Browse Source

missiles: add BUGFIX for MI_Apoca when handling golems

Prior to this fix, the apocalypse spell would hit the golem of the
4th player (i.e. plr[3]), since dMonster stores monster number + 1.
pull/2283/head
Robin Eklind 5 years ago
parent
commit
64ea9a5ec2
  1. 1
      Source/missiles.cpp

1
Source/missiles.cpp

@ -5413,6 +5413,7 @@ void MI_Apoca(int i)
exit = FALSE;
for (j = missile[i]._miVar2; j < missile[i]._miVar3 && !exit; j++) {
for (k = missile[i]._miVar4; k < missile[i]._miVar5 && !exit; k++) {
// BUGFIX: was `dMonster[k][j] > MAX_PLRS-1`, should be `dMonster[k][j]-1 >= MAX_PLRS`.
if (dMonster[k][j] > MAX_PLRS - 1 && !nSolidTable[dPiece[k][j]]) {
#ifdef HELLFIRE
if (LineClear(missile[i]._mix, missile[i]._miy, k, j)) {

Loading…
Cancel
Save