- Remove horizon from gi->WarpToCoords() since we don't even print the horizon in our stats.

This commit is contained in:
Mitchell Richters 2022-09-27 13:10:22 +10:00 committed by Christoph Oelckers
parent eedcfb46c6
commit 293a71ed55
10 changed files with 11 additions and 31 deletions

View file

@ -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"); }

View file

@ -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)

View file

@ -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;

View file

@ -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()

View file

@ -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()

View file

@ -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;

View file

@ -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;

View file

@ -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);
}
}
//---------------------------------------------------------------------------

View file

@ -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.); }

View file

@ -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);
}
}
//---------------------------------------------------------------------------