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"
35 #include "Animation.h"
41 #define attacktypecutoff 4
42 #define playercontrolled 5
44 #define getweapontype 7
45 #define pathfindtype 8
61 int oldcurrentanimation;
62 int oldtargetanimation;
66 float parriedrecently;
70 int lastattack,lastattack2,lastattack3;
72 XYZ currentoffset,targetoffset,offset;
90 float unconscioustime;
108 bool rabbitkickenabled;
117 float damagetolerance;
119 float permanentdamage;
120 float superpermanentdamage; float lastcollide;
138 float texupdatedelay;
140 float headrotation,headrotation2;
141 float targetheadrotation,targetheadrotation2;
152 float normalsupdatedelay;
157 bool forwardstogglekeydown;
162 bool jumptogglekeydown;
164 bool crouchtogglekeydown;
166 bool drawtogglekeydown;
168 bool throwtogglekeydown;
174 float crouchkeydowntime;
175 float jumpkeydowntime;
184 float losupdatedelay;
192 float whichdirectiondelay;
193 bool avoidsomething; XYZ avoidwhere;
194 float blooddimamount;
201 float lefthandmorphness;
202 float righthandmorphness;
204 float chestmorphness;
206 float targetlefthandmorphness;
207 float targetrighthandmorphness;
208 float targetheadmorphness;
209 float targetchestmorphness;
210 float targettailmorphness;
211 int lefthandmorphstart,lefthandmorphend;
212 int righthandmorphstart,righthandmorphend;
213 int headmorphstart,headmorphend;
214 int chestmorphstart,chestmorphend;
215 int tailmorphstart,tailmorphend;
217 float weaponmissdelay;
218 float highreversaldelay;
219 float lowreversaldelay;
220 float nocollidedelay;
233 float protectionhead;
234 float protectionhigh;
244 char clothes[10][256];
245 float clothestintr[10];
246 float clothestintg[10];
247 float clothestintb[10];
253 float onfiredelay; float burnt;
257 float updatestuffdelay;
265 int weaponstuckwhere;
270 int waypointtype[90];
272 bool hastempwaypoint;
278 XYZ finalfinaltarget;
280 int finalpathfindpoint;
281 int targetpathfindpoint;
282 int lastpathfindpoint;
283 int lastpathfindpoint2;
284 int lastpathfindpoint3;
285 int lastpathfindpoint4;
296 float runninghowlong; int lastoccluded;
301 float neckspurtdelay;
302 float neckspurtparticledelay;
303 float neckspurtamount;
306 bool rabbitkickragdoll;
311 Animation tempanimation;
317 void DoBlood(float howmuch, int which);
318 void DoBloodBig(float howmuch, int which);
319 bool DoBloodBigWhere(float howmuch, int which, XYZ where);
323 return animation_bits[currentanimation] & ab_idle;
327 return animation_bits[targetanimation] & ab_idle;
333 return animation_bits[targetanimation] & ab_sit;
338 return animation_bits[targetanimation] & ab_sleep;
343 return animation_bits[currentanimation] & ab_crouch;
347 return animation_bits[targetanimation] & ab_crouch;
353 return animation_bits[currentanimation] & ab_stop;
357 return animation_bits[targetanimation] & ab_stop;
367 return animation_bits[currentanimation] & ab_run;
371 return animation_bits[targetanimation] & ab_run;
377 return animation_bits[currentanimation] & ab_land;
381 return animation_bits[targetanimation] & ab_land;
387 return animation_bits[currentanimation] & ab_landhard;
391 return animation_bits[targetanimation] & ab_landhard;
397 return animation_bits[currentanimation] & ab_flip;
401 return animation_bits[targetanimation] & ab_flip;
408 return animation_bits[targetanimation] & ab_walljump;
411 void DoDamage(float howmuch);
415 glBindTexture(GL_TEXTURE_2D, skeleton.drawmodel.textureptr);
416 gluBuild2DMipmaps(GL_TEXTURE_2D, GL_RGB,
419 GL_RGB, GL_UNSIGNED_BYTE,
420 &skeleton.skinText[0]);
423 int SphereCheck(XYZ *p1,float radius, XYZ *p, XYZ *move, float *rotate, Model *model);
425 void Puff(int whichlabel);
426 void FootLand(int which, float opacity);
429 void RagDoll(bool checkcollision);
432 const int maxplayers = 10;
433 extern Person player[maxplayers];