From 5b962e69ab5185427674fa8bce1ccc2de72865f0 Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Sat, 10 Sep 2022 22:20:04 +1000 Subject: [PATCH] - Blood: Eliminate `VIEW::weaponZ`. --- source/games/blood/src/player.h | 1 + source/games/blood/src/view.cpp | 4 ++-- source/games/blood/src/view.h | 1 - 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/source/games/blood/src/player.h b/source/games/blood/src/player.h index 002f1ee27..30b15bd72 100644 --- a/source/games/blood/src/player.h +++ b/source/games/blood/src/player.h @@ -107,6 +107,7 @@ struct PLAYER int ozView; int zViewVel; int zWeapon; + int ozWeapon; int zWeaponVel; int slope; bool isUnderwater; diff --git a/source/games/blood/src/view.cpp b/source/games/blood/src/view.cpp index ebdc470a7..fa6f497b6 100644 --- a/source/games/blood/src/view.cpp +++ b/source/games/blood/src/view.cpp @@ -62,7 +62,7 @@ void viewBackupView(int nPlayer) PLAYER* pPlayer = &gPlayer[nPlayer]; VIEW* pView = &gPrevView[nPlayer]; pPlayer->ozView = pPlayer->zView; - pView->weaponZ = pPlayer->zWeapon - pPlayer->zView - 0xc00; + pPlayer->ozWeapon = pPlayer->zWeapon - pPlayer->zView - 0xc00; pView->horiz = pPlayer->horizon.horiz; pView->horizoff = pPlayer->horizon.horizoff; pView->slope = pPlayer->slope; @@ -502,7 +502,7 @@ static void SetupView(int& cX, int& cY, int& cZ, DAngle& cA, fixedhoriz& cH, sec cX = interpolatedvalue(gView->actor->opos.X, gView->actor->spr.pos.X, smoothratio * (1. / MaxSmoothRatio)) * worldtoint; 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(pView->weaponZ, gView->zWeapon - gView->zView - (12 << 8), smoothratio * (1. / MaxSmoothRatio)); + zDelta = interpolatedvalue(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(pView->shakeBobX, gView->swayWidth, smoothratio * (1. / MaxSmoothRatio)); diff --git a/source/games/blood/src/view.h b/source/games/blood/src/view.h index 9e4fdb448..5b6551fb2 100644 --- a/source/games/blood/src/view.h +++ b/source/games/blood/src/view.h @@ -43,7 +43,6 @@ struct VIEW { fixedhoriz horiz; // horiz fixedhoriz horizoff; // horizoff int slope; - int weaponZ; // weapon z int zViewVel; int zWeapon; int zWeaponVel;