]> 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 89d5b40277022d92e445c55449f42e86a08cbf0a..3c415a5bc829664d938e1fccdc9be6c69187a349 100644 (file)
@@ -157,6 +157,7 @@ public:
 
     std::shared_ptr<Person> victim;
     bool hasvictim;
+    bool isplayerfriend;
 
     float updatedelay;
     float normalsupdatedelay;
@@ -405,6 +406,8 @@ public:
 
     bool hasWeapon() { return (weaponactive != -1); }
     bool isPlayerControlled() { return (aitype == playercontrolled); }
+    bool isPlayerFriend() { return isplayerfriend; }
+    bool isPlayerTeam() { return isPlayerControlled() || isPlayerFriend(); }
 };
 
 const int maxplayers = 10;