static void DoMouse(Game & game)
{
- if(mainmenu||(abs(game.deltah)<10*realmultiplier*1000&&abs(game.deltav)<10*realmultiplier*1000))
+ if(mainmenu|| ( (abs(game.deltah)<10*realmultiplier*1000) && (abs(game.deltav)<10*realmultiplier*1000) ))
{
game.deltah *= usermousesensitivity;
game.deltav *= usermousesensitivity;
count = multiplier*sps;
if(count<2)count=2;
- //if(count>10)count=10;
realmultiplier=multiplier;
multiplier*=gamespeed;
if(difficulty==0)multiplier*=.8;
if(game.loading==4)multiplier*=.00001;
- //multiplier*.9;
if(slomo&&!mainmenu)multiplier*=slomospeed;
- //if(freeze)multiplier*=0.00001;
oldmult=multiplier;
multiplier/=(float)count;
extern int hostile;
extern float hostiletime;
-extern int mainmenu;
-
extern int numfalls;
extern int numflipfail;
extern int numseen;
static XYZ facing;
static float lookspeed=500;
- if(!freeze&&!winfreeze&&(!mainmenu||!gamestarted)){
+ if(!freeze&&!winfreeze){
//head facing
targetheadrotation=(float)((int)((0-rotation-targetheadrotation+180)*100)%36000)/100;
targetanimation=getRun();
targetframe=0;
}
- /*static float toggledelay;
- toggledelay-=multiplier;
- if(toggledelay<0){
- toggledelay=1;
- if(Random()%3==0)superruntoggle=1-superruntoggle;
- }*/
}
if(weaponactive==-1&&num_weapons>0){
if(weapons.type[weaponids[0]]==staff){
if(!skeleton.free)Sprite::MakeSprite(bloodsprite, DoRotation((skeleton.joints[skeleton.jointlabels[abdomen]].position+skeleton.joints[skeleton.jointlabels[abdomen]].position)/2,0,rotation,0)*scale+coords,bloodvel, 1,1,1, .05, 1);
}
}
- /*if(id==0){
- bloodloss+=deathbleeding*40;
- deathbleeding=0;
- }*/
bloodloss+=deathbleeding*multiplier*80;
deathbleeding-=multiplier*1.6;
//if(id==0)deathbleeding-=multiplier*.2;
if(endy>skeleton.skinsize-1){endy=skeleton.skinsize-1;bleeding=0;}
if(endx<startx)endx=startx;
if(endy<starty)endy=starty;
- /*int startx=0;
- int starty=0;
- int endx=256;
- int endy=256;*/
for(i=startx;i<endx;i++){
for(j=starty;j<endy;j++){
}
damage+=20;
-
- /*
- if(bloodloss<damagetolerance)
- for(i=0;i<skeleton.num_joints;i++){
- skeleton.joints[i].velocity*=1.5;
- }*/
}
//if(dead)damage-=multiplier/4;
if(findDistancefast(&viewer,&coords)<viewdistance*viewdistance/256&&(detail!=1&&detail!=2)){
playerdetail=1;
}
- if(id==0)playerdetail=1;
- if(playerdetail!=oldplayerdetail)updatedelay=0;
- if(playerdetail!=oldplayerdetail)normalsupdatedelay=0;
+ if(id==0)
+ playerdetail=1;
+ if(playerdetail!=oldplayerdetail) {
+ updatedelay=0;
+ normalsupdatedelay=0;
+ }
static float updatedelaychange;
static float morphness;
static float framemult;
}
}
}
- if(!skeleton.free&&(!animation[targetanimation].attack&&targetanimation!=getupfrombackanim&&targetanimation!=getupfrombackanim&&((targetanimation!=rollanim&&!isFlip())||animation[targetanimation].label[targetframe]==6)&&targetanimation!=getupfromfrontanim&&targetanimation!=wolfrunninganim&&targetanimation!=rabbitrunninganim&&targetanimation!=backhandspringanim&&targetanimation!=walljumpfrontanim&&targetanimation!=hurtidleanim&&!isLandhard()&&!isSleeping()))DoHead();
+ if(!skeleton.free&&(!animation[targetanimation].attack&&targetanimation!=getupfrombackanim&&((targetanimation!=rollanim&&!isFlip())||animation[targetanimation].label[targetframe]==6)&&targetanimation!=getupfromfrontanim&&targetanimation!=wolfrunninganim&&targetanimation!=rabbitrunninganim&&targetanimation!=backhandspringanim&&targetanimation!=walljumpfrontanim&&targetanimation!=hurtidleanim&&!isLandhard()&&!isSleeping()))
+ DoHead();
else {
targetheadrotation=-targetrotation;
targetheadrotation2=0;