]> git.jsancho.org Git - lugaru.git/blobdiff - Source/Person.h
Moved Person loading from file into a Person constructor
[lugaru.git] / Source / Person.h
index e3598b05cec19560dcfdbb660d0b3a85fc2d78c4..3afbdca6d68e9699fbf976d759c634783a135edd 100644 (file)
@@ -47,6 +47,12 @@ along with Lugaru.  If not, see <http://www.gnu.org/licenses/>.
 #define rabbittype 0
 #define wolftype 1
 
+struct InvalidPersonException : public exception {
+   const char * what () const throw () {
+      return "Invalid weapon number";
+   }
+};
+
 class Person : public enable_shared_from_this<Person>
 {
 public:
@@ -88,7 +94,6 @@ public:
     XYZ realoldcoords;
     XYZ oldcoords;
     XYZ coords;
-    XYZ originalcoords;
     XYZ velocity;
 
     XYZ proportionhead;
@@ -133,14 +138,11 @@ public:
 
     float jumppower;
     bool onground;
-    int madskills;
 
     int wentforweapon;
 
     bool calcrot;
 
-    bool backwardsanim;
-
     XYZ facing;
 
     float bleeding;
@@ -193,7 +195,6 @@ public:
     float aiupdatedelay;
     float losupdatedelay;
     int ally;
-    XYZ movetarget;
     float collide;
     float collided;
     float avoidcollided;
@@ -228,7 +229,6 @@ public:
     float weaponmissdelay;
     float highreversaldelay;
     float lowreversaldelay;
-    float nocollidedelay;
 
     int creature;
 
@@ -263,10 +263,8 @@ public:
     bool onfire;
     float onfiredelay;
     float burnt;
-    float fireduration;
 
     float flamedelay;
-    float updatestuffdelay;
 
     int playerdetail;
 
@@ -283,8 +281,6 @@ public:
     XYZ waypoints[90];
     int waypointtype[90];
     float pausetime;
-    bool hastempwaypoint;
-    XYZ tempwaypoint;
 
     XYZ headtarget;
     float interestdelay;
@@ -297,10 +293,8 @@ public:
     int lastpathfindpoint2;
     int lastpathfindpoint3;
     int lastpathfindpoint4;
-    bool onpath;
 
     int waypoint;
-    bool jumppath;
 
     XYZ lastseen;
     float lastseentime;
@@ -320,9 +314,6 @@ public:
     int whichskin;
     bool rabbitkickragdoll;
 
-    XYZ averageloc;
-    XYZ oldaverageloc;
-
     Animation tempanimation;
 
     float occluded;
@@ -330,6 +321,7 @@ public:
     bool jumpclimb;
 
     Person();
+    Person(FILE*, int, unsigned);
 
     // convenience functions
     inline Joint& joint(int bodypart) { return skeleton.joints[skeleton.jointlabels[bodypart]]; }