- Blood: Eliminate VIEW bobbing/swaying members.

This commit is contained in:
Mitchell Richters 2022-09-10 22:28:21 +10:00 committed by Christoph Oelckers
parent 9a41145a8a
commit d7b91df06e
3 changed files with 12 additions and 12 deletions

View file

@ -96,10 +96,14 @@ struct PLAYER
int bobAmp;
int bobHeight;
int bobWidth;
int obobHeight;
int obobWidth;
int swayPhase;
int swayAmp;
int swayHeight;
int swayWidth;
int oswayHeight;
int oswayWidth;
int nPlayer; // Connect id
int lifeMode;
int bloodlust; // ---> useless

View file

@ -63,10 +63,10 @@ void viewBackupView(int nPlayer)
VIEW* pView = &gPrevView[nPlayer];
pPlayer->ozView = pPlayer->zView;
pPlayer->ozWeapon = pPlayer->zWeapon - pPlayer->zView - 0xc00;
pView->bobHeight = pPlayer->bobHeight;
pView->bobWidth = pPlayer->bobWidth;
pView->shakeBobY = pPlayer->swayHeight;
pView->shakeBobX = pPlayer->swayWidth;
pPlayer->obobHeight = pPlayer->bobHeight;
pPlayer->obobWidth = pPlayer->bobWidth;
pPlayer->oswayHeight = pPlayer->swayHeight;
pPlayer->oswayWidth = pPlayer->swayWidth;
pView->look_ang = pPlayer->angle.look_ang;
pView->rotscrnang = pPlayer->angle.rotscrnang;
pPlayer->angle.backup();
@ -500,10 +500,10 @@ static void SetupView(int& cX, int& cY, int& cZ, DAngle& cA, fixedhoriz& cH, sec
cY = interpolatedvalue(gView->actor->opos.Y, gView->actor->spr.pos.Y, smoothratio * (1. / MaxSmoothRatio)) * worldtoint;
cZ = interpolatedvalue(gView->ozView, gView->zView, smoothratio * (1. / MaxSmoothRatio));
zDelta = interpolatedvalue<double>(gView->ozWeapon, gView->zWeapon - gView->zView - (12 << 8), smoothratio * (1. / MaxSmoothRatio));
bobWidth = interpolatedvalue(pView->bobWidth, gView->bobWidth, smoothratio * (1. / MaxSmoothRatio));
bobHeight = interpolatedvalue(pView->bobHeight, gView->bobHeight, smoothratio * (1. / MaxSmoothRatio));
shakeX = interpolatedvalue<double>(pView->shakeBobX, gView->swayWidth, smoothratio * (1. / MaxSmoothRatio));
shakeY = interpolatedvalue<double>(pView->shakeBobY, gView->swayHeight, smoothratio * (1. / MaxSmoothRatio));
bobWidth = interpolatedvalue(gView->obobWidth, gView->bobWidth, smoothratio * (1. / MaxSmoothRatio));
bobHeight = interpolatedvalue(gView->obobHeight, gView->bobHeight, smoothratio * (1. / MaxSmoothRatio));
shakeX = interpolatedvalue<double>(gView->oswayWidth, gView->swayWidth, smoothratio * (1. / MaxSmoothRatio));
shakeY = interpolatedvalue<double>(gView->oswayHeight, gView->swayHeight, smoothratio * (1. / MaxSmoothRatio));
if (!SyncInput())
{

View file

@ -34,10 +34,6 @@ BEGIN_BLD_NS
struct VIEW {
int bobPhase;
int Kills;
int bobHeight; // bob height
int bobWidth; // bob width
int swayPhase;
int swayAmp;
int shakeBobY; // bob sway y
int shakeBobX; // bob sway x
int zViewVel;