#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:
XYZ realoldcoords;
XYZ oldcoords;
XYZ coords;
- XYZ originalcoords;
XYZ velocity;
XYZ proportionhead;
float jumppower;
bool onground;
- int madskills;
int wentforweapon;
bool calcrot;
- bool backwardsanim;
-
XYZ facing;
float bleeding;
float aiupdatedelay;
float losupdatedelay;
int ally;
- XYZ movetarget;
float collide;
float collided;
float avoidcollided;
float weaponmissdelay;
float highreversaldelay;
float lowreversaldelay;
- float nocollidedelay;
int creature;
bool onfire;
float onfiredelay;
float burnt;
- float fireduration;
float flamedelay;
- float updatestuffdelay;
int playerdetail;
XYZ waypoints[90];
int waypointtype[90];
float pausetime;
- bool hastempwaypoint;
- XYZ tempwaypoint;
XYZ headtarget;
float interestdelay;
int lastpathfindpoint2;
int lastpathfindpoint3;
int lastpathfindpoint4;
- bool onpath;
int waypoint;
- bool jumppath;
XYZ lastseen;
float lastseentime;
float stunned;
float surprised;
float runninghowlong;
+ int occluded;
int lastoccluded;
int laststanding;
int escapednum;
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]]; }
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();
void takeWeapon (int weaponId);
bool addClothes(const int& clothesId);
- bool addClothes(const char* fileName);
+ void addClothes();
};
const int maxplayers = 10;