X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FPerson.cpp;h=d77c81e6b47b3cb341ccc12f691158970f1a79f8;hb=14d27ff7369d8892e08b520309c90ece4ab883a7;hp=dcccedec0a6ccbbd60b8e690e90ff99638eb95ef;hpb=4e2058b0ad83f1320008f980fac2234e579d3d99;p=lugaru.git diff --git a/Source/Person.cpp b/Source/Person.cpp index dcccede..d77c81e 100644 --- a/Source/Person.cpp +++ b/Source/Person.cpp @@ -22,10 +22,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. /**> HEADER FILES <**/ #include "Person.h" #include "openal_wrapper.h" +#include "Animation.h" +#include "Sounds.h" +#include "Awards.h" +#include "Game.h" extern float multiplier; -extern Animation animation[animation_count]; -extern OPENAL_SAMPLE *samp[100]; extern int channels[100]; extern Terrain terrain; extern float gravity; @@ -51,11 +53,8 @@ extern float terraindetail; extern float viewdistance; extern float blackout; extern int difficulty; -extern Weapons weapons; extern bool decals; extern float fadestart; -extern Person player[maxplayers]; -extern int numplayers; extern bool freeze; extern bool winfreeze; extern float flashamount,flashr,flashg,flashb; @@ -84,29 +83,13 @@ extern bool reversaltrain; extern bool canattack; extern bool cananger; extern float damagedealt; -extern float damagetaken; extern int hostile; extern float hostiletime; -extern int numfalls; -extern int numflipfail; -extern int numseen; -extern int numswordattack; -extern int numknifeattack; -extern int numunarmedattack; -extern int numescaped; -extern int numflipped; -extern int numwallflipped; -extern int numthrowkill; -extern int numafterkill; -extern int numreversals; -extern int numattacks; -extern int maxalarmed; extern int indialogue; extern bool gamestarted; -extern OPENAL_STREAM * strm[20]; extern "C" void PlaySoundEx(int channel, OPENAL_SAMPLE *sptr, OPENAL_DSPUNIT *dsp, signed char startpaused); extern "C" void PlayStreamEx(int chan, OPENAL_STREAM *sptr, OPENAL_DSPUNIT *dsp, signed char startpaused); @@ -221,7 +204,7 @@ void Person::CatchFire(){ vel[1]=velocity.y; vel[2]=velocity.z; //PlaySoundEx( firesound, samp[firesound], NULL, true); - PlayStreamEx( stream_firesound, strm[stream_firesound], NULL, true); + PlayStreamEx( stream_firesound, samp[stream_firesound], NULL, true); OPENAL_3D_SetAttributes(channels[stream_firesound], gLoc, vel); OPENAL_SetVolume(channels[stream_firesound], 256); OPENAL_SetPaused(channels[stream_firesound], false); @@ -6331,21 +6314,6 @@ void Person::DoStuff(){ velocity=flatfacing*velspeed; } - /*if(creature==wolftype) - if(isRun()){ - velocity+=facing*multiplier*speed*700*scale; - velspeed=findLength(&velocity); - if(velspeed>speed*55*scale){ - velocity/=velspeed; - velspeed=speed*55*scale; - velocity*=velspeed; - } - velocity.y+=gravity*multiplier*20; - ReflectVector(&velocity,terrain.getNormal(coords.x,coords.z)); - velspeed=findLength(&velocity); - velocity=flatfacing*velspeed; - }*/ - if(targetanimation==rollanim&&animation[targetanimation].label[targetframe]!=6){ velocity+=facing*multiplier*speed*700*scale; velspeed=findLength(&velocity);