]> git.jsancho.org Git - lugaru.git/blobdiff - Source/Objects/Person.hpp
Friends fight with true enemies, before they attacked player but hurting enemies
[lugaru.git] / Source / Objects / Person.hpp
index 2ead16e9a87922d662cbf65b5bc922175afe6a74..3c415a5bc829664d938e1fccdc9be6c69187a349 100644 (file)
@@ -157,6 +157,7 @@ public:
 
     std::shared_ptr<Person> victim;
     bool hasvictim;
+    bool isplayerfriend;
 
     float updatedelay;
     float normalsupdatedelay;
@@ -318,7 +319,7 @@ public:
     Person();
     Person(FILE*, int, unsigned);
 
-    void skeletonLoad(bool clothes = false);
+    void skeletonLoad();
 
     // convenience functions
     inline Joint& joint(int bodypart) { return skeleton.joints[skeleton.jointlabels[bodypart]]; }
@@ -331,6 +332,8 @@ public:
     float getProportion(int part) const;
     XYZ getProportionXYZ(int part) const;
 
+    void changeCreatureType(person_type type);
+
     void CheckKick();
     void CatchFire();
     void DoBlood(float howmuch, int which);
@@ -398,6 +401,13 @@ public:
     void addClothes();
 
     void doAI();
+
+    bool catchKnife();
+
+    bool hasWeapon() { return (weaponactive != -1); }
+    bool isPlayerControlled() { return (aitype == playercontrolled); }
+    bool isPlayerFriend() { return isplayerfriend; }
+    bool isPlayerTeam() { return isPlayerControlled() || isPlayerFriend(); }
 };
 
 const int maxplayers = 10;