Skip to content

Commit

Permalink
fix: correct the implementation of Actor::isRemoved
Browse files Browse the repository at this point in the history
  • Loading branch information
wu-vincent committed Jan 24, 2025
1 parent 65031ce commit 0d35ccf
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/bedrock/world/actor/actor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ bool Actor::isPlayer() const

bool Actor::isRemoved() const
{
return !isAlive();
return removed_;
}

bool Actor::isOnGround() const
Expand All @@ -103,9 +103,14 @@ Dimension &Actor::getDimension() const
return *dimension_.unwrap();
}

Level &Actor::getLevel() const
Level &Actor::getLevel()
{
return *level_;
return *static_cast<Level *>(level_);
}

const Level &Actor::getLevel() const
{
return *static_cast<Level *>(level_);
}

Vec3 const &Actor::getPosition() const
Expand Down

0 comments on commit 0d35ccf

Please sign in to comment.