Skip to content

Commit

Permalink
LocalPlayer: remove an unused getHitBuilding
Browse files Browse the repository at this point in the history
  • Loading branch information
atupone committed Dec 13, 2024
1 parent f500b94 commit d7d3742
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 19 deletions.
17 changes: 0 additions & 17 deletions src/bzflag/LocalPlayer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -909,23 +909,6 @@ void LocalPlayer::doUpdateMotion(float dt)
}


const Obstacle* LocalPlayer::getHitBuilding(const float* p, float a,
bool phased, bool& expelled) const
{
const float* dims = getDimensions();
const Obstacle* obstacle =
World::getWorld()->hitBuilding(p, a, dims[0], dims[1], dims[2]);

expelled = (obstacle != NULL);
if (expelled && phased)
expelled = (obstacle->getType() == WallObstacle::getClassName() ||
obstacle->getType() == Teleporter::getClassName() ||
(getFlag() == Flags::OscillationOverthruster && desiredSpeed < 0.0f &&
p[2] == 0.0f));
return obstacle;
}


const Obstacle* LocalPlayer::getHitBuilding(const float* oldP, float oldA,
const float* p, float a,
bool phased, bool& expelled)
Expand Down
2 changes: 0 additions & 2 deletions src/bzflag/LocalPlayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,6 @@ class LocalPlayer : public BaseLocalPlayer
static LocalPlayer* getMyTank();
static void setMyTank(LocalPlayer*);

const Obstacle* getHitBuilding(const float* pos, float angle,
bool phased, bool& expel) const;
const Obstacle* getHitBuilding(const float* oldPos, float oldAngle,
const float* pos, float angle,
bool phased, bool& expel);
Expand Down

0 comments on commit d7d3742

Please sign in to comment.