Avoid caching turn past a user action (which causes problems if we suspend/resume across turns)
This commit is contained in:
parent
4970d0fd9e
commit
5e1518c2bb
|
@ -484,13 +484,14 @@
|
||||||
|
|
||||||
(define (stop-if-inert-after action)
|
(define (stop-if-inert-after action)
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(define turn (current-turn))
|
(define f (turn-active-facet (current-turn)))
|
||||||
(define f (turn-active-facet turn))
|
|
||||||
(action)
|
(action)
|
||||||
(turn-enqueue! turn f (lambda ()
|
(turn-enqueue! (current-turn)
|
||||||
(when (or (and (facet-parent f) (not (facet-live? (facet-parent f))))
|
f
|
||||||
(facet-inert? f))
|
(lambda ()
|
||||||
(turn-stop! (current-turn)))))))
|
(when (or (and (facet-parent f) (not (facet-live? (facet-parent f))))
|
||||||
|
(facet-inert? f))
|
||||||
|
(turn-stop! (current-turn)))))))
|
||||||
|
|
||||||
(define (deliver maybe-proc . args)
|
(define (deliver maybe-proc . args)
|
||||||
(when maybe-proc
|
(when maybe-proc
|
||||||
|
|
Loading…
Reference in New Issue