Skip to content

Commit

Permalink
improve: remove some thins and new talkaction for set dust level
Browse files Browse the repository at this point in the history
Added new tags to vocations.xml
Removed not necessary "CreateItem" from player.cpp
Removed unused function from position.cpp
Set from "return false" to "continue' at outfit.cpp for not stop console loading
  • Loading branch information
dudantas committed Jan 22, 2024
1 parent abe5c76 commit c28fa22
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 19 deletions.
17 changes: 0 additions & 17 deletions src/game/movement/position.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,20 +47,3 @@ std::ostream &operator<<(std::ostream &os, const Direction &dir) {

return os;
}

std::unordered_set<Position> Position::getSurroundingPositions(uint32_t radius /*= 1*/) const {
std::unordered_set<Position> positions;
int centerX = getX();
int centerY = getY();

for (int x = centerX - radius; x <= centerX + radius; ++x) {
for (int y = centerY - radius; y <= centerY + radius; ++y) {
int distanceSquared = (x - centerX) * (x - centerX) + (y - centerY) * (y - centerY);
if (distanceSquared <= radius * radius) {
positions.insert(Position(x, y, getZ()));
}
}
}

return positions;
}
2 changes: 0 additions & 2 deletions src/game/movement/position.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,6 @@ struct Position {
return Position(x - p1.x, y - p1.y, z - p1.z);
}

std::unordered_set<Position> getSurroundingPositions(uint32_t radius = 1) const;

std::string toString() const {
std::string str;
return str.append("( ")
Expand Down

0 comments on commit c28fa22

Please sign in to comment.