X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;ds=sidebyside;f=Source%2FPerson.cpp;h=122800b519a37d459278e090a18f7da52cd47cde;hb=8afdcba610cded0e54b85069ba051268b29669a6;hp=a74b2df22a3ab39f3797f614666503721d402804;hpb=8a1a91c0a10a37799dc95d423f9db8dc5ff7b965;p=lugaru.git diff --git a/Source/Person.cpp b/Source/Person.cpp index a74b2df..122800b 100644 --- a/Source/Person.cpp +++ b/Source/Person.cpp @@ -296,7 +296,6 @@ void Person::DoBlood(float howmuch,int which){ bleeding=howmuch+(float)abs(Random()%100)/200-.25; bleedxint=0; bleedyint=0; - int texdetailint=realtexdetail; if(creature==rabbittype) while(bloodText[bleedxint*512*3+bleedyint*3+0]>which+4||bloodText[bleedxint*512*3+bleedyint*3+0]500||bleedyint>500){ bleedxint=abs(Random()%512); @@ -401,9 +400,7 @@ void Person::DoBloodBig(float howmuch,int which){ offsetx=Random()%20; } if(which==220||which==215){ - //offsety=Random()%20; offsetx=20; - //offsetx=abs(Random()%80); } @@ -519,7 +516,7 @@ void Person::DoBloodBig(float howmuch,int which){ } bool Person::DoBloodBigWhere(float howmuch,int which, XYZ where){ - static int bleedxint,bleedyint,i,j; + static int i,j; static XYZ bloodvel; static XYZ startpoint,endpoint,colpoint,movepoint; static float rotationpoint; @@ -1670,10 +1667,9 @@ void Person::DoAnimations(){ } } - static bool willwork; if(targetanimation==crouchremoveknifeanim&&animation[targetanimation].label[currentframe]==5){ for(i=0;iid&&victim->skeleton.free)) if(willwork&&findDistancefastflat(&coords,&weapons[i].position)<3&&weaponactive==-1){ if(findDistancefast(&coords,&weapons[i].position)<1||hasvictim){ - bool fleshstuck=0; + bool fleshstuck=false; if(weapons[i].owner!=-1) if(victim->weaponstuck!=-1){ if(victim->weaponids[victim->weaponstuck]==i){ - fleshstuck=1; + fleshstuck=true; } } - if(!fleshstuck){ + if(fleshstuck){ + emit_sound_at(fleshstabremovesound, coords, 128.); + } else { if(weapons[i].getType()!=staff){ emit_sound_at(knifedrawsound, coords, 128.); } } - if(fleshstuck){ - emit_sound_at(fleshstabremovesound, coords, 128.); - } weaponactive=0; if(weapons[i].owner!=-1){ @@ -3411,7 +3406,6 @@ void Person::DoAnimations(){ resume_stream(whooshsound); } if(targetanimation==sneakattackanim){ - float ycoords=oldcoords.y; currentanimation=getCrouch(); targetanimation=getCrouch(); targetframe=1; @@ -3428,7 +3422,6 @@ void Person::DoAnimations(){ lastfeint=0; } if(targetanimation==knifesneakattackanim||targetanimation==swordsneakattackanim){ - float ycoords=oldcoords.y; targetanimation=getIdle(); targetframe=0; if(onterrain)coords.y=terrain.getHeight(coords.x,coords.z); @@ -3748,7 +3741,6 @@ void Person::DoStuff(){ static int howmany; static int bloodsize; static int startx,starty,endx,endy; - static int texdetailint; static GLubyte color; static XYZ bloodvel; @@ -3960,7 +3952,6 @@ void Person::DoStuff(){ startx=0; starty=0; - texdetailint=realtexdetail; startx=bleedy;//abs(Random()%(skeleton.skinsize-bloodsize-1)); starty=bleedx;//abs(Random()%(skeleton.skinsize-bloodsize-1)); endx=startx+bloodsize; @@ -4466,15 +4457,6 @@ void Person::DoStuff(){ velocity=0; } - float gLoc[3]; - float vel[3]; - gLoc[0]=coords.x; - gLoc[1]=coords.y; - gLoc[2]=coords.z; - vel[0]=velocity.x; - vel[1]=velocity.y; - vel[2]=velocity.z; - if(findLength(&average)<10&&dead&&skeleton.free){ skeleton.longdead+=(2000-findLength(&average))*multiplier+multiplier; if(skeleton.longdead>2000){ @@ -4614,23 +4596,9 @@ void Person::DoStuff(){ if(terrainnormal.z<0)targetrotation=180-targetrotation; rotation=targetrotation; - /*if(onterrain){ - terrainnormal=terrain.getNormal(coords.x,coords.z); - targettilt2=asin(terrainnormal.y)*180/3.14*-1; - } - else*/ - - /*XYZ otherterrainnormal; - otherterrainnormal=terrain.getNormal(coords.x,coords.y); - otherterrainnormal.y=fast_sqrt(otherterrainnormal.x*otherterrainnormal.x+otherterrainnormal.z*otherterrainnormal.z)*-1; - if(abs(terrainnormal.y)