Browse Source

🐛 Fix Phasing not working in Lazarus' camber

Previously an improper check was being done to see if the player was
located on the 3 teleporting pads in the level. Even if fixng this the
spell would not work correctly if the layer was standing on the pads
when casting the spell.

Simply use TARGET_BOTH to indicate that it should not be random and send
the player to the given destination
pull/2727/head
Anders Jenbo 5 years ago
parent
commit
bf706f2fbb
  1. 14
      Source/missiles.cpp
  2. 4
      Source/objects.cpp

14
Source/missiles.cpp

@ -1873,15 +1873,11 @@ void AddRndTeleport(MissileStruct &missile, Point dst, Direction /*midir*/)
auto &player = Players[missile._misource];
if (setlevel && setlvlnum == SL_VILEBETRAYER) {
int oi = dObject[dst.x][dst.y] - 1;
// BUGFIX: should only run magic circle check if dObject[dx][dy] is non-zero.
if (Objects[oi]._otype == OBJ_MCIRCLE1 || Objects[oi]._otype == OBJ_MCIRCLE2) {
missile.position.tile = dst;
if (!PosOkPlayer(player, dst))
UpdateVileMissPos(missile, dst);
return;
}
if (missile._micaster == TARGET_BOTH) {
missile.position.tile = dst;
if (!PosOkPlayer(player, dst))
UpdateVileMissPos(missile, dst);
return;
}
std::array<Point, 13 * 13 - 7 * 7> targets;

4
Source/objects.cpp

@ -1474,7 +1474,7 @@ void UpdateCircle(int i)
ObjChangeMapResync(Objects[i]._oVar1, Objects[i]._oVar2, Objects[i]._oVar3, Objects[i]._oVar4);
if (Quests[Q_BETRAYER]._qactive == QUEST_ACTIVE && Quests[Q_BETRAYER]._qvar1 <= 4) // BUGFIX stepping on the circle again will break the quest state (fixed)
Quests[Q_BETRAYER]._qvar1 = 4;
AddMissile(myPlayer.position.tile, { 35, 46 }, myPlayer._pdir, MIS_RNDTELEPORT, TARGET_MONSTERS, MyPlayerId, 0, 0);
AddMissile(myPlayer.position.tile, { 35, 46 }, DIR_S, MIS_RNDTELEPORT, TARGET_BOTH, MyPlayerId, 0, 0);
LastMouseButtonAction = MouseActionType::None;
sgbMouseDown = CLICK_NONE;
ClrPlrPath(myPlayer);
@ -2207,7 +2207,7 @@ void OperateBook(int pnum, int i)
}
if (doAddMissile) {
Objects[dObject[35][36] - 1]._oVar5++;
AddMissile(player.position.tile, { dx, dy }, player._pdir, MIS_RNDTELEPORT, TARGET_MONSTERS, pnum, 0, 0);
AddMissile(player.position.tile, { dx, dy }, DIR_S, MIS_RNDTELEPORT, TARGET_BOTH, pnum, 0, 0);
missileAdded = true;
doAddMissile = false;
}

Loading…
Cancel
Save