From 406e289c1f79e96811a581b92d679368ebbb0042 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Mon, 2 Mar 2020 02:37:59 +0100 Subject: [PATCH] added flag do_not_touch_this_wall --- flags.cpp | 4 ++++ pcmove.cpp | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/flags.cpp b/flags.cpp index db39d1e7..3b9083b4 100644 --- a/flags.cpp +++ b/flags.cpp @@ -363,5 +363,9 @@ EX bool hornStuns(cell *c) { attackJustStuns(c, AF_NORMAL, moNone); } +/** changing this wall for whatever reason may cause the game to crash */ +EX bool do_not_touch_this_wall(cell *c) { + return among(c->wall, waMirrorWall, waBarrier, waRoundTable); + } } diff --git a/pcmove.cpp b/pcmove.cpp index 0fc89e2e..ac3c139e 100644 --- a/pcmove.cpp +++ b/pcmove.cpp @@ -935,7 +935,7 @@ bool pcmove::attack() { } EX bool chaos_forbidden(cell *c) { - return among(c->wall, waMirrorWall, waBarrier, waRoundTable) || isMultitile(c->monst); + return do_not_touch_this_wall(c) || isMultitile(c->monst); } bool pcmove::perform_actual_move() {