]> git.jsancho.org Git - lugaru.git/blobdiff - Source/Person.h
Simplify idle animations
[lugaru.git] / Source / Person.h
index 5c5a96983c2c17abffd02dc568d22232c8736183..10f6ab2808d96779aac7119e180fc870109957b0 100644 (file)
@@ -33,6 +33,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 #include "Sprite.h"
 #include <cmath>
 #include "Weapons.h"
+#include "Animation.h"
 
 #define passivetype 0
 #define guardtype 1
@@ -322,8 +323,14 @@ class Person
                void DoBloodBig(float howmuch, int which);
                bool DoBloodBigWhere(float howmuch, int which, XYZ where);
                
-               bool wasIdle();
-               bool isIdle();
+               bool wasIdle()
+               {
+                 return animation_bits[currentanimation] & ab_idle;
+               }
+               bool isIdle()
+               {
+                 return animation_bits[targetanimation] & ab_idle;
+               }
                int getIdle();
                
                bool isSitting();