]> git.jsancho.org Git - lugaru.git/blobdiff - Source/Person.h
Cleaned up a bit clothes adding
[lugaru.git] / Source / Person.h
index 4b165fb1683454e019e30045e86b51dc8125e809..801553a394e363e83515e7ab37da14df5e0a3f38 100644 (file)
@@ -1,22 +1,21 @@
 /*
 Copyright (C) 2003, 2010 - Wolfire Games
+Copyright (C) 2010-2016 - Lugaru contributors (see AUTHORS file)
 
 This file is part of Lugaru.
 
-Lugaru is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
+Lugaru is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
 
-This program is distributed in the hope that it will be useful,
+Lugaru is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-See the GNU General Public License for more details.
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+along with Lugaru.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef _PERSON_H_
@@ -129,6 +128,7 @@ public:
     float permanentdamage;
     float superpermanentdamage;
     float lastcollide;
+    /* Seems to be 0 = alive, 1 = unconscious, 2 = dead */
     int dead;
 
     float jumppower;
@@ -272,10 +272,12 @@ public:
 
     int num_weapons;
     int weaponids[4];
+    /* Key of weaponids which is the weapon in hand, if any. -1 otherwise.
+     * Always 0 or -1 as activeweapon is moved to position 0 when taken */
     int weaponactive;
     int weaponstuck;
+    /* 0 or 1 to say if weapon is stuck in the front or the back  */
     int weaponstuckwhere;
-    int weaponwhere;
 
     int numwaypoints;
     XYZ waypoints[90];
@@ -394,6 +396,11 @@ public:
     void setAnimation(int);
     void DoAnimations();
     void RagDoll(bool checkcollision);
+
+    void takeWeapon (int weaponId);
+
+    bool addClothes(const int& clothesId);
+    bool addClothes(const char* fileName);
 };
 
 const int maxplayers = 10;