X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FPerson.h;h=1749a565791c561d4936c3940edb3d178feb62d8;hb=4b65ff967257d8cfd673257e464c3e3e35822ec1;hp=ae7390f44a0172a7d345a317def7c9488ec6566b;hpb=44146d06c780d3aaa283672fedb08b8870ebe1b9;p=lugaru.git diff --git a/Source/Person.h b/Source/Person.h index ae7390f..1749a56 100644 --- a/Source/Person.h +++ b/Source/Person.h @@ -26,14 +26,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "gamegl.h" #include "Quaternions.h" -#include "fmod.h" #include "Skeleton.h" #include "Models.h" #include "Constants.h" #include "Terrain.h" -#include "Sprites.h" +#include "Sprite.h" #include #include "Weapons.h" +#include "Animation.h" #define passivetype 0 #define guardtype 1 @@ -48,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: @@ -332,13 +323,25 @@ 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 isSitting() + { + return animation_bits[targetanimation] & ab_sit; + } + + bool isSleeping() + { + return animation_bits[targetanimation] & ab_sleep; + } bool wasCrouch(); bool isCrouch(); @@ -381,7 +384,7 @@ class Person void DoStuff(); void DoAnimations(); void RagDoll(bool checkcollision); - HitStruct BulletCollideWithPlayer(XYZ start, XYZ end); }; +extern Person player[maxplayers]; #endif