X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;ds=sidebyside;f=Source%2FPerson.cpp;h=47212bd59ac3eee01265620103cc9898e86e4f63;hb=bbf8873b80baf3cb468ac12b3f62b0938320fef1;hp=2c704158607f3182cc86ed021172ba997bd3555d;hpb=0e6f0a2a7fa114db16973eb09ce05e1709ce0fe1;p=lugaru.git diff --git a/Source/Person.cpp b/Source/Person.cpp index 2c70415..47212bd 100644 --- a/Source/Person.cpp +++ b/Source/Person.cpp @@ -28,7 +28,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "Game.h" extern float multiplier; -extern int channels[100]; extern Terrain terrain; extern float gravity; extern int environment; @@ -49,7 +48,6 @@ extern bool osx; extern bool autoslomo; extern float camerashake; extern float woozy; -extern float terraindetail; extern float viewdistance; extern float blackout; extern int difficulty; @@ -85,6 +83,8 @@ extern int indialogue; extern bool gamestarted; +Person player[maxplayers]; + void Person::CheckKick() { if (!(hasvictim @@ -123,7 +123,8 @@ void Person::CheckKick() velocity=facing*-10; velocity.y=5; skeleton.free=0; - if(id==0)OPENAL_SetPaused(channels[whooshsound], false); + if(id==0) + resume_stream(whooshsound); award_bonus(id, cannon); } @@ -1322,8 +1323,8 @@ void Person::RagDoll(bool checkcollision){ skeleton.joints[j].position-=average; } - whichpatchx=coords.x/(terrain.size/subdivision*terrain.scale*terraindetail); - whichpatchz=coords.z/(terrain.size/subdivision*terrain.scale*terraindetail); + whichpatchx=coords.x/(terrain.size/subdivision*terrain.scale); + whichpatchz=coords.z/(terrain.size/subdivision*terrain.scale); if(terrain.patchobjectnum[whichpatchx][whichpatchz]) for(l=0;l2000){ if(skeleton.longdead>6000){ - if(id==0)OPENAL_SetPaused(channels[whooshsound], true); + if(id==0)pause_sound(whooshsound); skeleton.free=3; DrawSkeleton(); skeleton.free=2; @@ -4582,7 +4582,7 @@ void Person::DoStuff(){ if(findLength(&average)<10&&!dead&&skeleton.free){ skeleton.longdead+=(2000-findLength(&average))*multiplier+multiplier; if(skeleton.longdead>(damage+500)*1.5){ - if(id==0)OPENAL_SetPaused(channels[whooshsound], true); + if(id==0)pause_sound(whooshsound); skeleton.free=0; velocity=0; XYZ middle; @@ -5294,7 +5294,7 @@ void Person::DoStuff(){ onterrain=1; if(id==0){ - OPENAL_SetPaused(channels[whooshsound], true); + pause_sound(whooshsound); OPENAL_SetVolume(channels[whooshsound], 0); } @@ -5650,35 +5650,11 @@ int Person::DrawSkeleton(){ skeleton.muscles[i].lastrotate3=skeleton.muscles[i].rotate3; glRotatef(-skeleton.muscles[i].lastrotate3,0,1,0); - /* - if(!isnormal(proportionbody.x)||!isnormal(proportionbody.y)||!isnormal(proportionbody.z)){ - proportionbody=1; - proportionweird=1; - } - if(!isnormal(proportionarms.x)||!isnormal(proportionarms.y)||!isnormal(proportionarms.z)){ - proportionarms=1; - proportionweird=1; - } - if(!isnormal(proportionhead.x)||!isnormal(proportionhead.y)||!isnormal(proportionhead.z)){ - proportionhead=1; - proportionweird=1; - } - if(!isnormal(proportionlegs.x)||!isnormal(proportionlegs.y)||!isnormal(proportionlegs.z)){ - proportionlegs=1; - proportionweird=1; - }*/ if(playerdetail||skeleton.free==3) { for(j=0;j=0){*/ glMatrixMode(GL_MODELVIEW); // Select The Modelview Matrix glPushMatrix(); if(skeleton.muscles[i].parent1->label==abdomen||skeleton.muscles[i].parent2->label==abdomen) @@ -5973,13 +5949,6 @@ int Person::DrawSkeleton(){ CrossProduct(&vec1,&vec2,&tempnormthing); Normalise(&tempnormthing); if(targetanimation!=staffhitanim&¤tanimation!=staffhitanim&&targetanimation!=staffgroundsmashanim&¤tanimation!=staffgroundsmashanim&&targetanimation!=staffspinhitanim&¤tanimation!=staffspinhitanim)weaponpoint+=tempnormthing*.1-skeleton.specialforward[1]*.3+(skeleton.joints[skeleton.jointlabels[rightwrist]].position-skeleton.joints[skeleton.jointlabels[rightelbow]].position); - /*if(targetanimation==staffhitanim||currentanimation==staffhitanim){ - XYZ weaptargnorm; - weaptargnorm=DoRotation(weapons.tippoint[i]-weapons.position[i],0,-rotation,0); - //weaptargnorm=animation[currentanimation].weapontarget[currentframe]*(1-target)+animation[targetanimation].weapontarget[targetframe]*(target); - Normalise(&weaptargnorm); - weaponpoint-=weaptargnorm*2; - }*/ } } if(weaponactive!=k&&weaponstuck!=k){ @@ -6214,7 +6183,7 @@ int Person::SphereCheck(XYZ *p1,float radius, XYZ *p, XYZ *move, float *rotate, onterrain=1; if(id==0){ - OPENAL_SetPaused(channels[whooshsound], true); + pause_sound(whooshsound); OPENAL_SetVolume(channels[whooshsound], 0); }