X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FPerson.h;h=28f21b559b6cc57250e7840010bec627b14528fb;hb=797dc38c1623b98280500df2ab37edba4effabea;hp=27666e4bf904fe99cd04b1d1c0b1d3e50710a665;hpb=4e2058b0ad83f1320008f980fac2234e579d3d99;p=lugaru.git diff --git a/Source/Person.h b/Source/Person.h index 27666e4..28f21b5 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 @@ -322,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(); @@ -342,8 +361,14 @@ class Person bool isSneak(); int getSneak(); - bool wasRun(); - bool isRun(); + bool wasRun() + { + return animation_bits[currentanimation] & ab_run; + } + bool isRun() + { + return animation_bits[targetanimation] & ab_run; + } int getRun(); bool wasLanding(); @@ -373,4 +398,5 @@ class Person void RagDoll(bool checkcollision); }; +extern Person player[maxplayers]; #endif