Skip to content

Commit

Permalink
Only update camera if unset.
Browse files Browse the repository at this point in the history
  • Loading branch information
Shinmera committed Jan 2, 2025
1 parent da65456 commit 2299d86
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scene.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
(name-map :initform (make-hash-table :test 'equal) :accessor name-map)))

(defmethod enter :after ((camera camera) (scene scene))
(setf (camera scene) camera))
(unless (camera scene)
(setf (camera scene) camera)))

(defmethod unit (name (scene scene))
(gethash name (name-map scene)))
Expand Down

0 comments on commit 2299d86

Please sign in to comment.