From 293a71ed55d1c6f95e3454f9c884dd3cb0cca810 Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Tue, 27 Sep 2022 13:10:22 +1000 Subject: [PATCH] - Remove horizon from `gi->WarpToCoords()` since we don't even print the horizon in our stats. --- source/core/gamestruct.h | 2 +- source/core/inputstate.cpp | 2 +- source/games/blood/src/blood.h | 2 +- source/games/blood/src/osdcmd.cpp | 7 +------ source/games/duke/src/ccmds.cpp | 7 +------ source/games/duke/src/duke3d.h | 2 +- source/games/exhumed/src/exhumed.h | 2 +- source/games/exhumed/src/osdcmds.cpp | 9 ++------- source/games/sw/src/game.h | 2 +- source/games/sw/src/osdcmds.cpp | 7 +------ 10 files changed, 11 insertions(+), 31 deletions(-) diff --git a/source/core/gamestruct.h b/source/core/gamestruct.h index bf5a319b4..78fbd626c 100644 --- a/source/core/gamestruct.h +++ b/source/core/gamestruct.h @@ -111,7 +111,7 @@ struct GameInterface virtual void SetTileProps(int tile, int surf, int vox, int shade) {} virtual double playerPitchMin() { return -57.375; } virtual double playerPitchMax() { return 57.375; } - virtual void WarpToCoords(double x, double y, double z, DAngle a, int h) {} + virtual void WarpToCoords(double x, double y, double z, DAngle a) {} virtual void ToggleThirdPerson() { } virtual void SwitchCoopView() { Printf("Unsupported command\n"); } virtual void ToggleShowWeapon() { Printf("Unsupported command\n"); } diff --git a/source/core/inputstate.cpp b/source/core/inputstate.cpp index 82de77d64..80e856c75 100644 --- a/source/core/inputstate.cpp +++ b/source/core/inputstate.cpp @@ -389,7 +389,7 @@ CCMD(warptocoords) horiz = atoi(argv[5]); } - gi->WarpToCoords(x, y, z, DAngle::fromDeg(ang), horiz); + gi->WarpToCoords(x, y, z, DAngle::fromDeg(ang)); } CCMD(third_person_view) diff --git a/source/games/blood/src/blood.h b/source/games/blood/src/blood.h index eb867a315..2f683e46a 100644 --- a/source/games/blood/src/blood.h +++ b/source/games/blood/src/blood.h @@ -135,7 +135,7 @@ struct GameInterface : public ::GameInterface void SetTileProps(int til, int surf, int vox, int shade) override; double playerPitchMin() override { return -54.575; } double playerPitchMax() override { return 43.15; } - void WarpToCoords(double x, double y, double z, DAngle a, int h) override; + void WarpToCoords(double x, double y, double z, DAngle a) override; void ToggleThirdPerson() override; void SwitchCoopView() override; void ToggleShowWeapon() override; diff --git a/source/games/blood/src/osdcmd.cpp b/source/games/blood/src/osdcmd.cpp index 88f2ec4eb..a8d9c1c6b 100644 --- a/source/games/blood/src/osdcmd.cpp +++ b/source/games/blood/src/osdcmd.cpp @@ -31,7 +31,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. BEGIN_BLD_NS -void GameInterface::WarpToCoords(double x, double y, double z, DAngle ang, int horz) +void GameInterface::WarpToCoords(double x, double y, double z, DAngle ang) { PLAYER* pPlayer = &gPlayer[myconnectindex]; @@ -42,11 +42,6 @@ void GameInterface::WarpToCoords(double x, double y, double z, DAngle ang, int h { pPlayer->angle.oang = pPlayer->angle.ang = ang; } - - if (horz != INT_MIN) - { - pPlayer->horizon.ohoriz = pPlayer->horizon.horiz = buildhoriz(horz); - } } void GameInterface::ToggleThirdPerson() diff --git a/source/games/duke/src/ccmds.cpp b/source/games/duke/src/ccmds.cpp index 4244ef8b6..710aa82a4 100644 --- a/source/games/duke/src/ccmds.cpp +++ b/source/games/duke/src/ccmds.cpp @@ -111,7 +111,7 @@ static int ccmd_spawn(CCmdFuncPtr parm) return CCMD_OK; } -void GameInterface::WarpToCoords(double x, double y, double z, DAngle ang, int horz) +void GameInterface::WarpToCoords(double x, double y, double z, DAngle ang) { player_struct* p = &ps[myconnectindex]; @@ -122,11 +122,6 @@ void GameInterface::WarpToCoords(double x, double y, double z, DAngle ang, int h { p->angle.oang = p->angle.ang = ang; } - - if (horz != INT_MIN) - { - p->horizon.ohoriz = p->horizon.horiz = buildhoriz(horz); - } } void GameInterface::ToggleThirdPerson() diff --git a/source/games/duke/src/duke3d.h b/source/games/duke/src/duke3d.h index 8a285537b..8c436cc61 100644 --- a/source/games/duke/src/duke3d.h +++ b/source/games/duke/src/duke3d.h @@ -51,7 +51,7 @@ struct GameInterface : public ::GameInterface void NewGame(MapRecord* map, int skill, bool) override; void LevelCompleted(MapRecord* map, int skill) override; bool DrawAutomapPlayer(const DVector2& mxy, const DVector2& cpos, const DAngle cang, const DVector2& xydim, const double czoom, double const interpfrac) override; - void WarpToCoords(double x, double y, double z, DAngle ang, int horz) override; + void WarpToCoords(double x, double y, double z, DAngle ang) override; void ToggleThirdPerson() override; void SwitchCoopView() override; void ToggleShowWeapon() override; diff --git a/source/games/exhumed/src/exhumed.h b/source/games/exhumed/src/exhumed.h index f05a9751e..a6163fd28 100644 --- a/source/games/exhumed/src/exhumed.h +++ b/source/games/exhumed/src/exhumed.h @@ -233,7 +233,7 @@ struct GameInterface : public ::GameInterface bool DrawAutomapPlayer(const DVector2& mxy, const DVector2& cpos, const DAngle cang, const DVector2& xydim, const double czoom, double const interpfrac) override; double playerPitchMin() override { return -49.5; } double playerPitchMax() override { return 49.5; } - void WarpToCoords(double x, double y, double z, DAngle ang, int horz) override; + void WarpToCoords(double x, double y, double z, DAngle ang) override; void ToggleThirdPerson() override; DVector3 chaseCamPos(DAngle ang, fixedhoriz horiz) { return DVector3(-ang.ToVector() * 96., horiz.Tan() * 96.); } void processSprites(tspriteArray& tsprites, const DVector3& view, DAngle viewang, double interpfrac) override; diff --git a/source/games/exhumed/src/osdcmds.cpp b/source/games/exhumed/src/osdcmds.cpp index 9f56d1d28..de76375ef 100644 --- a/source/games/exhumed/src/osdcmds.cpp +++ b/source/games/exhumed/src/osdcmds.cpp @@ -39,9 +39,9 @@ BEGIN_PS_NS // //--------------------------------------------------------------------------- -void GameInterface::WarpToCoords(double x, double y, double z, DAngle ang, int horz) +void GameInterface::WarpToCoords(double x, double y, double z, DAngle ang) { - Player *nPlayer = &PlayerList[nLocalPlayer]; + Player *nPlayer = &PlayerList[nLocalPlayer]; nPlayer->pActor->spr.pos = DVector3(x, y, z); nPlayer->pActor->backuppos(); @@ -50,11 +50,6 @@ void GameInterface::WarpToCoords(double x, double y, double z, DAngle ang, int h { nPlayer->angle.oang = nPlayer->angle.ang = ang; } - - if (horz != INT_MIN) - { - nPlayer->horizon.ohoriz = nPlayer->horizon.horiz = buildhoriz(horz); - } } //--------------------------------------------------------------------------- diff --git a/source/games/sw/src/game.h b/source/games/sw/src/game.h index 03c4c6171..3518e5f4b 100644 --- a/source/games/sw/src/game.h +++ b/source/games/sw/src/game.h @@ -1880,7 +1880,7 @@ struct GameInterface : public ::GameInterface void NextLevel(MapRecord *map, int skill) override; void NewGame(MapRecord *map, int skill, bool) override; bool DrawAutomapPlayer(const DVector2& mxy, const DVector2& cpos, const DAngle cang, const DVector2& xydim, const double czoom, double const interpfrac) override; - void WarpToCoords(double x, double y, double z, DAngle ang, int horz) override; + void WarpToCoords(double x, double y, double z, DAngle ang) override; void ToggleThirdPerson() override; void SwitchCoopView() override; DVector3 chaseCamPos(DAngle ang, fixedhoriz horiz) { return DVector3(-ang.ToVector() * 128., horiz.Tan() * 128.); } diff --git a/source/games/sw/src/osdcmds.cpp b/source/games/sw/src/osdcmds.cpp index c6c8ac99f..0dfb54e78 100644 --- a/source/games/sw/src/osdcmds.cpp +++ b/source/games/sw/src/osdcmds.cpp @@ -54,7 +54,7 @@ BEGIN_SW_NS // //--------------------------------------------------------------------------- -void GameInterface::WarpToCoords(double x, double y, double z, DAngle ang, int horz) +void GameInterface::WarpToCoords(double x, double y, double z, DAngle ang) { Player->pos = DVector3(x,y,z); @@ -64,11 +64,6 @@ void GameInterface::WarpToCoords(double x, double y, double z, DAngle ang, int h { Player->angle.oang = Player->angle.ang = ang; } - - if (horz != INT_MIN) - { - Player->horizon.ohoriz = Player->horizon.horiz = buildhoriz(horz); - } } //---------------------------------------------------------------------------