]> git.jsancho.org Git - lugaru.git/blobdiff - Source/Person.h
Simplify idle animations
[lugaru.git] / Source / Person.h
index cde2f8f7a93b2b16d6e76b346f1296fbb844b597..10f6ab2808d96779aac7119e180fc870109957b0 100644 (file)
@@ -30,9 +30,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 #include "Models.h"
 #include "Constants.h"
 #include "Terrain.h"
-#include "Sprites.h"
+#include "Sprite.h"
 #include <cmath>
 #include "Weapons.h"
+#include "Animation.h"
 
 #define passivetype 0
 #define guardtype 1
@@ -47,15 +48,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 #define rabbittype 0
 #define wolftype 1
 
-class HitStruct
-{
-       public:
-               Joint *joint1;
-               Joint *joint2;
-               XYZ hitlocation;
-               bool collision;
-};
-
 class Person
 {
        public:
@@ -331,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();
@@ -380,7 +378,7 @@ class Person
                void DoStuff();
                void DoAnimations();
                void RagDoll(bool checkcollision);
-               HitStruct BulletCollideWithPlayer(XYZ start, XYZ end);
 };
 
+extern Person player[maxplayers];
 #endif