2 Copyright (C) 2003, 2010 - Wolfire Games
4 This file is part of Lugaru.
6 Lugaru is free software; you can redistribute it and/or
7 modify it under the terms of the GNU General Public License
8 as published by the Free Software Foundation; either version 2
9 of the License, or (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15 See the GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25 /**> HEADER FILES <**/
28 #include "Quaternions.h"
31 #include "Constants.h"
36 #include "Animation.h"
42 #define attacktypecutoff 4
43 #define playercontrolled 5
45 #define getweapontype 7
46 #define pathfindtype 8
66 int oldcurrentanimation;
67 int oldtargetanimation;
71 float parriedrecently;
75 int lastattack,lastattack2,lastattack3;
77 XYZ currentoffset,targetoffset,offset;
95 float unconscioustime;
100 float targetrotation;
113 bool rabbitkickenabled;
122 float damagetolerance;
124 float permanentdamage;
125 float superpermanentdamage; float lastcollide;
143 float texupdatedelay;
145 float headrotation,headrotation2;
146 float targetheadrotation,targetheadrotation2;
157 float normalsupdatedelay;
162 bool forwardstogglekeydown;
167 bool jumptogglekeydown;
169 bool crouchtogglekeydown;
171 bool drawtogglekeydown;
173 bool throwtogglekeydown;
179 float crouchkeydowntime;
180 float jumpkeydowntime;
189 float losupdatedelay;
197 float whichdirectiondelay;
198 bool avoidsomething; XYZ avoidwhere;
199 float blooddimamount;
206 float lefthandmorphness;
207 float righthandmorphness;
209 float chestmorphness;
211 float targetlefthandmorphness;
212 float targetrighthandmorphness;
213 float targetheadmorphness;
214 float targetchestmorphness;
215 float targettailmorphness;
216 int lefthandmorphstart,lefthandmorphend;
217 int righthandmorphstart,righthandmorphend;
218 int headmorphstart,headmorphend;
219 int chestmorphstart,chestmorphend;
220 int tailmorphstart,tailmorphend;
222 float weaponmissdelay;
223 float highreversaldelay;
224 float lowreversaldelay;
225 float nocollidedelay;
238 float protectionhead;
239 float protectionhigh;
249 char clothes[10][256];
250 float clothestintr[10];
251 float clothestintg[10];
252 float clothestintb[10];
258 float onfiredelay; float burnt;
262 float updatestuffdelay;
270 int weaponstuckwhere;
275 int waypointtype[90];
277 bool hastempwaypoint;
283 XYZ finalfinaltarget;
285 int finalpathfindpoint;
286 int targetpathfindpoint;
287 int lastpathfindpoint;
288 int lastpathfindpoint2;
289 int lastpathfindpoint3;
290 int lastpathfindpoint4;
301 float runninghowlong; int lastoccluded;
306 float neckspurtdelay;
307 float neckspurtparticledelay;
308 float neckspurtamount;
311 bool rabbitkickragdoll;
316 Animation tempanimation;
322 void DoBlood(float howmuch, int which);
323 void DoBloodBig(float howmuch, int which);
324 bool DoBloodBigWhere(float howmuch, int which, XYZ where);
328 return animation_bits[currentanimation] & ab_idle;
332 return animation_bits[targetanimation] & ab_idle;
338 return animation_bits[targetanimation] & ab_sit;
343 return animation_bits[targetanimation] & ab_sleep;
348 return animation_bits[currentanimation] & ab_crouch;
352 return animation_bits[targetanimation] & ab_crouch;
358 return animation_bits[currentanimation] & ab_stop;
362 return animation_bits[targetanimation] & ab_stop;
372 return animation_bits[currentanimation] & ab_run;
376 return animation_bits[targetanimation] & ab_run;
395 void DoDamage(float howmuch);
397 void DoMipmaps(int howmanylevels, float startx, float endx, float starty, float endy);
398 int SphereCheck(XYZ *p1,float radius, XYZ *p, XYZ *move, float *rotate, Model *model);
400 void Puff(int whichlabel);
401 void FootLand(int which, float opacity);
404 void RagDoll(bool checkcollision);
407 extern Person player[maxplayers];