From 9e8b75f9949259ef01942cd3717b79b044efddf7 Mon Sep 17 00:00:00 2001 From: Gene Pasquet Date: Wed, 8 Apr 2026 01:57:20 +0100 Subject: Refactor update pipelines --- tween.scm | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'tween.scm') diff --git a/tween.scm b/tween.scm index 3475a83..eb8fbd8 100644 --- a/tween.scm +++ b/tween.scm @@ -197,12 +197,11 @@ ;; when the tween finishes. (define-pipeline (step-tweens tweens) (entity dt) - (let ((tw (entity-ref entity #:tween #f))) - (if (not tw) - entity - (receive (tw2 ent2) (tween-step tw entity dt) - (if (tween-finished? tw2) - (entity-set ent2 #:tween #f) - (entity-set ent2 #:tween tw2)))))) + guard: (entity-ref entity #:tween #f) + (let ((tw (entity-ref entity #:tween))) + (receive (tw2 ent2) (tween-step tw entity dt) + (if (tween-finished? tw2) + (entity-set ent2 #:tween #f) + (entity-set ent2 #:tween tw2))))) ) ;; end module -- cgit v1.2.3