X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FPerson.h;h=8f8006ad3a0e24df9924f1061a864451565d4c30;hb=cc377fcd2e0bb5bc2ea9bda2dec2210bca474dbe;hp=517ca0d5057a544358f8ac9b69ad70cd50b1d8f4;hpb=8265984dce72d262e3865ebad4668d98b5b26d4a;p=lugaru.git diff --git a/Source/Person.h b/Source/Person.h index 517ca0d..8f8006a 100644 --- a/Source/Person.h +++ b/Source/Person.h @@ -33,6 +33,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "Sprite.h" #include #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,16 +323,34 @@ 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(); - bool isSleeping(); - - - bool wasCrouch(); - bool isCrouch(); + bool isSitting() + { + return animation_bits[targetanimation] & ab_sit; + } + + bool isSleeping() + { + return animation_bits[targetanimation] & ab_sleep; + } + + bool wasCrouch() + { + return animation_bits[currentanimation] & ab_crouch; + } + bool isCrouch() + { + return animation_bits[targetanimation] & ab_crouch; + } int getCrouch(); bool wasStop(); @@ -380,7 +390,7 @@ class Person void DoStuff(); void DoAnimations(); void RagDoll(bool checkcollision); - HitStruct BulletCollideWithPlayer(XYZ start, XYZ end); }; +extern Person player[maxplayers]; #endif