X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;ds=sidebyside;f=Source%2FPerson.h;h=a11f22bdafb074882c302ae2731af931937e773c;hb=20e924d;hp=801553a394e363e83515e7ab37da14df5e0a3f38;hpb=90a372e7d97dd17e83a02732444788cc4b8f31a0;p=lugaru.git
diff --git a/Source/Person.h b/Source/Person.h
index 801553a..a11f22b 100644
--- a/Source/Person.h
+++ b/Source/Person.h
@@ -47,6 +47,12 @@ along with Lugaru. If not, see .
#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
{
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;
@@ -308,6 +302,7 @@ public:
float stunned;
float surprised;
float runninghowlong;
+ int occluded;
int lastoccluded;
int laststanding;
int escapednum;
@@ -320,16 +315,12 @@ public:
int whichskin;
bool rabbitkickragdoll;
- XYZ averageloc;
- XYZ oldaverageloc;
-
Animation tempanimation;
- float occluded;
-
bool jumpclimb;
-
+ Person();
+ Person(FILE*, int, unsigned);
// convenience functions
inline Joint& joint(int bodypart) { return skeleton.joints[skeleton.jointlabels[bodypart]]; }
@@ -391,7 +382,7 @@ public:
int SphereCheck(XYZ *p1, float radius, XYZ *p, XYZ *move, float *rotate, Model *model);
int DrawSkeleton();
void Puff(int whichlabel);
- void FootLand(int which, float opacity);
+ void FootLand(bodyparts whichfoot, float opacity);
void DoStuff();
void setAnimation(int);
void DoAnimations();
@@ -400,7 +391,7 @@ public:
void takeWeapon (int weaponId);
bool addClothes(const int& clothesId);
- bool addClothes(const char* fileName);
+ void addClothes();
};
const int maxplayers = 10;