Proper SCALEDNOLERP usage.
This commit is contained in:
parent
dca677f74f
commit
9ac0cb2a6f
3 changed files with 16 additions and 14 deletions
|
|
@ -79,14 +79,17 @@ extend Class Demolitionist
|
|||
player.viewz = ceilingz-4;
|
||||
if ( player.viewz < floorz+4 )
|
||||
player.viewz = floorz+4;
|
||||
// add viewpos Y for side bob
|
||||
// add viewpos Y for side bob (currently breaks SCALEDNOLERP)
|
||||
SetViewPos((0.,bob.x*clamp(viewbob,0.,1.5),0.));
|
||||
}
|
||||
|
||||
override void CheckPitch()
|
||||
{
|
||||
if ( bFly && !bFlyCheat && !(player.cheats&CF_NOCLIP2) )
|
||||
return; // handled in moveplayer
|
||||
{
|
||||
if ( player.cmd.pitch == -32768 ) player.centering = true;
|
||||
return; // the rest is handled in moveplayer
|
||||
}
|
||||
Super.CheckPitch();
|
||||
}
|
||||
|
||||
|
|
@ -152,7 +155,7 @@ extend Class Demolitionist
|
|||
if ( player.turnticks )
|
||||
{
|
||||
player.turnticks--;
|
||||
angle += (180./TURN180_TICKS);
|
||||
A_SetAngle(angle+(180./TURN180_TICKS),SPF_INTERPOLATE);
|
||||
}
|
||||
else guideangle += .2*player.cmd.yaw*(360./65536.);
|
||||
guidepitch -= .2*player.cmd.pitch*(360./65536.);
|
||||
|
|
@ -192,7 +195,6 @@ extend Class Demolitionist
|
|||
}
|
||||
else
|
||||
{
|
||||
player.cheats |= CF_SCALEDNOLERP; // smoother turning
|
||||
if ( player.turnticks )
|
||||
{
|
||||
player.turnticks--;
|
||||
|
|
@ -265,7 +267,7 @@ extend Class Demolitionist
|
|||
vel *= fact;
|
||||
player.vel *= fact;
|
||||
}
|
||||
if ( abs(roll) > 0. ) A_SetRoll(roll+clamp(deltaangle(roll,0),-3.,3.),SPF_INTERPOLATE);
|
||||
if ( abs(roll) > 0. ) roll += clamp(deltaangle(roll,0),-3.,3.);
|
||||
}
|
||||
guideangle *= .9;
|
||||
guidepitch *= .9;
|
||||
|
|
|
|||
|
|
@ -426,26 +426,26 @@ extend Class Demolitionist
|
|||
lagvel.z += bumpvelz*.2;
|
||||
bumpvelz *= .8;
|
||||
}
|
||||
Vector3 temp = (ViewAngle,ViewPitch,ViewRoll);
|
||||
if ( abs(bumpangle) > double.epsilon )
|
||||
{
|
||||
ViewAngle += bumpangle*.5;
|
||||
temp.x += bumpangle*.5;
|
||||
bumpangle *= .8;
|
||||
}
|
||||
if ( abs(bumppitch) > double.epsilon )
|
||||
{
|
||||
ViewPitch += bumppitch*.5;
|
||||
temp.y += bumppitch*.5;
|
||||
bumppitch *= .8;
|
||||
}
|
||||
if ( abs(bumproll) > double.epsilon )
|
||||
{
|
||||
ViewRoll += bumproll*.5;
|
||||
temp.z += bumproll*.5;
|
||||
bumproll *= .8;
|
||||
}
|
||||
// stabilize view angles
|
||||
ViewAngle *= .8;
|
||||
ViewPitch *= .8;
|
||||
ViewRoll *= .8;
|
||||
player.cheats |= CF_INTERPVIEWANGLES;
|
||||
A_SetViewAngle(temp.x*.8,SPF_INTERPOLATE);
|
||||
A_SetViewPitch(temp.y*.8,SPF_INTERPOLATE);
|
||||
A_SetViewRoll(temp.z*.8,SPF_INTERPOLATE);
|
||||
if ( player.onground && !lastground ) landvelz = lastvelz;
|
||||
else if ( !player.onground && lastground ) landvelz = 0;
|
||||
else if ( player.onground && lastground ) landvelz *= .9;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue