X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FObjects%2FPerson.hpp;h=3c415a5bc829664d938e1fccdc9be6c69187a349;hb=refs%2Fheads%2Fimprovements;hp=9492fb704f5ad59a714e7b545299f97e3b4eb2ed;hpb=265236f7b4d05d576a4a6fd81823abff5f3f757b;p=lugaru.git diff --git a/Source/Objects/Person.hpp b/Source/Objects/Person.hpp index 9492fb7..3c415a5 100644 --- a/Source/Objects/Person.hpp +++ b/Source/Objects/Person.hpp @@ -157,6 +157,7 @@ public: std::shared_ptr victim; bool hasvictim; + bool isplayerfriend; float updatedelay; float normalsupdatedelay; @@ -402,6 +403,11 @@ public: 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;