diff options
author | Boutade <thegoofist@protonmail.com> | 2019-10-19 10:06:39 -0500 |
---|---|---|
committer | Boutade <thegoofist@protonmail.com> | 2019-10-19 10:06:39 -0500 |
commit | 93a3a824cffe040cedefb2432c76a58a71d3d496 (patch) | |
tree | da8134e4d8a6af9ec73552b692e1673b800afff3 | |
parent | 78f5f0496da67c9321f7de5854512002c677057d (diff) |
bug
-rw-r--r-- | the-price-of-a-cup-of-coffee.lisp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/the-price-of-a-cup-of-coffee.lisp b/the-price-of-a-cup-of-coffee.lisp index f13e060..f79320c 100644 --- a/the-price-of-a-cup-of-coffee.lisp +++ b/the-price-of-a-cup-of-coffee.lisp @@ -136,9 +136,6 @@ (frame 0) (next-frame-at 0)) -(defmethod (setf face) :after (new-val (human human)) - (setf (frame human) 0)) - (defun x-pos (person) (sdl2:rect-x (pos person))) @@ -159,7 +156,8 @@ (defun get-frame-rect (human) (with-slots (faces face frame) human - (aref (funcall face faces) frame))) + (let ((seq (funcall face faces))) + (aref seq (min (1- (length seq)) frame))))) (defmethod initialize-instance :after ((human human) &key) (setf (walk-speed human) 6) |