Skip to content

Commit c7b6c67

Browse files
committed
fix #146: Allow stopping "warp" scripts
1 parent 26edb40 commit c7b6c67

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/engine/virtualmachine.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -190,15 +190,13 @@ void VirtualMachine::moveToLastCheckpoint()
190190
* \param[in] savePos Changes the return value of savePos().
191191
* \param[in] breakAtomic Whether to break the frame after stopping the script.
192192
* \param[in] goBack Whether to go back so that the current instruction can run again in the future.
193-
* \note Nothing will happen if the script is set to run without screen refresh.
193+
* \note breakAtomic doesn't have any effect if the script is set to run without screen refresh.
194194
*/
195195
void VirtualMachine::stop(bool savePos, bool breakAtomic, bool goBack)
196196
{
197-
if (impl->warp)
198-
return;
199197
impl->stop = true;
200198
impl->savePos = savePos;
201-
impl->atomic = !breakAtomic;
199+
impl->atomic = !breakAtomic || impl->warp;
202200
impl->goBack = goBack;
203201
}
204202

0 commit comments

Comments
 (0)