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;
183 float losupdatedelay;
191 float whichdirectiondelay;
192 bool avoidsomething; XYZ avoidwhere;
193 float blooddimamount;
200 float lefthandmorphness;
201 float righthandmorphness;
203 float chestmorphness;
205 float targetlefthandmorphness;
206 float targetrighthandmorphness;
207 float targetheadmorphness;
208 float targetchestmorphness;
209 float targettailmorphness;
210 int lefthandmorphstart,lefthandmorphend;
211 int righthandmorphstart,righthandmorphend;
212 int headmorphstart,headmorphend;
213 int chestmorphstart,chestmorphend;
214 int tailmorphstart,tailmorphend;
216 float weaponmissdelay;
217 float highreversaldelay;
218 float lowreversaldelay;
219 float nocollidedelay;
232 float protectionhead;
233 float protectionhigh;
243 char clothes[10][256];
244 float clothestintr[10];
245 float clothestintg[10];
246 float clothestintb[10];
252 float onfiredelay; float burnt;
256 float updatestuffdelay;
264 int weaponstuckwhere;
269 int waypointtype[90];
271 bool hastempwaypoint;
277 XYZ finalfinaltarget;
279 int finalpathfindpoint;
280 int targetpathfindpoint;
281 int lastpathfindpoint;
282 int lastpathfindpoint2;
283 int lastpathfindpoint3;
284 int lastpathfindpoint4;
295 float runninghowlong; int lastoccluded;
300 float neckspurtdelay;
301 float neckspurtparticledelay;
302 float neckspurtamount;
305 bool rabbitkickragdoll;
310 Animation tempanimation;
316 void DoBlood(float howmuch, int which);
317 void DoBloodBig(float howmuch, int which);
318 bool DoBloodBigWhere(float howmuch, int which, XYZ where);
322 return animation_bits[currentanimation] & ab_idle;
326 return animation_bits[targetanimation] & ab_idle;
332 return animation_bits[targetanimation] & ab_sit;
337 return animation_bits[targetanimation] & ab_sleep;
342 return animation_bits[currentanimation] & ab_crouch;
346 return animation_bits[targetanimation] & ab_crouch;
352 return animation_bits[currentanimation] & ab_stop;
356 return animation_bits[targetanimation] & ab_stop;
366 return animation_bits[currentanimation] & ab_run;
370 return animation_bits[targetanimation] & ab_run;
376 return animation_bits[currentanimation] & ab_land;
380 return animation_bits[targetanimation] & ab_land;
386 return animation_bits[currentanimation] & ab_landhard;
390 return animation_bits[targetanimation] & ab_landhard;
396 return animation_bits[currentanimation] & ab_flip;
400 return animation_bits[targetanimation] & ab_flip;
407 return animation_bits[targetanimation] & ab_walljump;
410 void DoDamage(float howmuch);
414 glBindTexture(GL_TEXTURE_2D, skeleton.drawmodel.textureptr);
415 gluBuild2DMipmaps(GL_TEXTURE_2D, GL_RGB,
418 GL_RGB, GL_UNSIGNED_BYTE,
419 &skeleton.skinText[0]);
422 int SphereCheck(XYZ *p1,float radius, XYZ *p, XYZ *move, float *rotate, Model *model);
424 void Puff(int whichlabel);
425 void FootLand(int which, float opacity);
428 void RagDoll(bool checkcollision);
431 const int maxplayers = 10;
432 extern Person player[maxplayers];