From a6edbe33782cacc592d9346abbdb7eb831ee5616 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Thu, 5 Nov 2020 14:46:09 +0100 Subject: [PATCH] fixed some bugs with push --- pcmove.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pcmove.cpp b/pcmove.cpp index f237d137..f68a99b3 100644 --- a/pcmove.cpp +++ b/pcmove.cpp @@ -513,8 +513,10 @@ struct changes_t { void push_push(cell *tgt) { pushes.push_back(tgt); - rollbacks.push_back([] { pushes.pop_back(); }); - } + auto v = [] { pushes.pop_back(); }; + rollbacks.push_back(v); + commits.push_back(v); + } }; #endif @@ -757,6 +759,7 @@ bool pcmove::after_escape() { nextmovetype = lmMove; addMessage(XLAT("You push %the1 behind you!", waBigStatue)); animateMovement(mi.rev(), LAYER_BOAT); + changes.push_push(cwt.at); return perform_actual_move(); }