blob: 0074e8da21014bcbc4d6ac47e2f8dfc460255ae9 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
|
#ifndef _PERSON_H_
#define _PERSON_H_
/**> HEADER FILES <**/
#include <cmath>
#include <GL/gl.h>
#include <AL/al.h>
#include "Quaternions.h"
#include "Constants.h"
#include "Skeleton.h"
#include "Models.h"
#include "Camera.h"
#include "Sprites.h"
enum PersonType { playertype, civiliantype, eviltype, viptype, zombietype };
class HitStruct
{
public:
Joint *joint1;
Joint *joint2;
XYZ hitlocation;
bool collision;
};
class Person
{
public:
int eaten;
int currentframe;
int targetframe;
int currentanimation;
int targetanimation;
float target;
float playerhealth;
int modelnum;
XYZ oldplayercoords;
XYZ playercoords;
XYZ playervelocity;
float playerrotation;
float playerrotation2;
float playerlowrotation;
float pathcheckdelay;
bool onground;
bool backwardsanim;
XYZ facing;
XYZ velocity;
float shotdelay;
bool firing;
bool litup;
bool existing;
PersonType type;
int whichcostume;
Skeleton skeleton;
Animation tempanimation;
float speed;
bool aiming;
bool grenphase;
float grenamount;
float aimamount;
float speedmult;
float pathsize;
int pathnum;
int oldpathnum;
int oldoldpathnum;
int oldoldoldpathnum;
XYZ pathtarget;
int whichblockx;
int whichblocky;
bool dead;
XYZ averageloc;
XYZ oldaverageloc;
float lastdistancevictim;
bool firstlongdead;
float longdead;
Joint *bjoint1,*bjoint2;
float bleeding;
float bleeddelay;
float attacktarget;
int attackframe;
int killtarget;
bool killtargetvisible;
float gunrotate1, gunrotate2, gunrotate3;
float recoil;
int whichgun;
float oldhealth;
float health;
float maxhealth;
float reloading;
int ammo;
int reloads[10];
bool running;
bool onpath;
void FindRotationGun(XYZ start, XYZ target);
int drawSkeleton();
void control();
void DoStuff(int who);
void DoAnimations(int who);
void DoAnimationslite(int who);
HitStruct BulletCollideWithPlayer(int who, XYZ start, XYZ end);
};
class Costume
{
public:
float headcolor[3];
float handcolor[3];
float footcolor[3];
float upperarmcolor[3];
float lowerarmcolor[3];
float upperlegcolor[3];
float lowerlegcolor[3];
float abdomencolor[3];
float chestcolor[3];
};
#endif
|