mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-18 22:51:50 +00:00
- Remove GameInterface::getConsoleActor()
in place of direct access.
This commit is contained in:
parent
6de8fc91d6
commit
16189ff7f9
7 changed files with 4 additions and 7 deletions
|
@ -47,6 +47,8 @@
|
|||
#include "gamestruct.h"
|
||||
#include "statusbar.h"
|
||||
#include "coreactor.h"
|
||||
#include "d_net.h"
|
||||
#include "coreplayer.h"
|
||||
|
||||
CVARD(Bool, cl_crosshair, true, CVAR_ARCHIVE, "enable/disable crosshair");
|
||||
CVARD(Bool, cl_automsg, false, CVAR_ARCHIVE, "enable/disable automatically sending messages to all players") // Not implemented for Blood
|
||||
|
@ -250,7 +252,7 @@ ADD_STAT(fps)
|
|||
ADD_STAT(coord)
|
||||
{
|
||||
FString out;
|
||||
if (const auto pActor = gi->getConsoleActor())
|
||||
if (const auto pActor = PlayerArray[myconnectindex]->GetActor())
|
||||
{
|
||||
out.AppendFormat("X: %.4f ", pActor->spr.pos.X);
|
||||
out.AppendFormat("Y: %.4f ", pActor->spr.pos.Y);
|
||||
|
|
|
@ -721,7 +721,7 @@ CCMD(warptocoords)
|
|||
return;
|
||||
}
|
||||
|
||||
if (const auto pActor = gi->getConsoleActor())
|
||||
if (const auto pActor = PlayerArray[myconnectindex]->actor)
|
||||
{
|
||||
pActor->spr.pos = DVector3(atof(argv[1]), atof(argv[2]), atof(argv[3]));
|
||||
if (argv.argc() > 4) pActor->spr.Angles.Yaw = DAngle::fromDeg(atof(argv[4]));
|
||||
|
|
|
@ -99,7 +99,6 @@ struct GameInterface
|
|||
virtual bool DrawAutomapPlayer(const DVector2& mxy, const DVector2& cpos, const DAngle cang, const DVector2& xydim, const double czoom, double const interpfrac) { return false; }
|
||||
virtual DAngle playerPitchMin() { return DAngle::fromDeg(57.375); }
|
||||
virtual DAngle playerPitchMax() { return DAngle::fromDeg(-57.375); }
|
||||
virtual DCoreActor* getConsoleActor() = 0;
|
||||
virtual void ToggleThirdPerson() = 0;
|
||||
virtual void SwitchCoopView() { Printf("Unsupported command\n"); }
|
||||
virtual void ToggleShowWeapon() { Printf("Unsupported command\n"); }
|
||||
|
|
|
@ -122,7 +122,6 @@ 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;
|
||||
DAngle playerPitchMin() override { return DAngle::fromDeg(54.575); }
|
||||
DAngle playerPitchMax() override { return DAngle::fromDeg(-43.15); }
|
||||
DCoreActor* getConsoleActor() override { return getPlayer(myconnectindex)->GetActor(); }
|
||||
void ToggleThirdPerson() override;
|
||||
void SwitchCoopView() override;
|
||||
void ToggleShowWeapon() override;
|
||||
|
|
|
@ -50,7 +50,6 @@ 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;
|
||||
DCoreActor* getConsoleActor() override { return PlayerArray[myconnectindex]->GetActor(); }
|
||||
void ToggleThirdPerson() override;
|
||||
void SwitchCoopView() override;
|
||||
void ToggleShowWeapon() override;
|
||||
|
|
|
@ -234,7 +234,6 @@ 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;
|
||||
DAngle playerPitchMin() override { return DAngle::fromDeg(49.5); }
|
||||
DAngle playerPitchMax() override { return DAngle::fromDeg(-49.5); }
|
||||
DCoreActor* getConsoleActor() override { return getPlayer(nLocalPlayer)->GetActor(); }
|
||||
void ToggleThirdPerson() override;
|
||||
void processSprites(tspriteArray& tsprites, const DVector3& view, DAngle viewang, double interpfrac) override;
|
||||
int GetCurrentSkill() override;
|
||||
|
|
|
@ -1890,7 +1890,6 @@ 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;
|
||||
DCoreActor* getConsoleActor() override { return getPlayer(myconnectindex)->GetActor(); }
|
||||
void ToggleThirdPerson() override;
|
||||
void SwitchCoopView() override;
|
||||
void processSprites(tspriteArray& tsprites, const DVector3& view, DAngle viewang, double smoothRatio) override;
|
||||
|
|
Loading…
Reference in a new issue