mirror of
https://github.com/edubart/otclient.git
synced 2025-12-02 16:06:51 +01:00
Buttons for client options
This commit is contained in:
@@ -166,7 +166,7 @@ public:
|
||||
return Otc::InvalidDirection;
|
||||
}
|
||||
|
||||
bool isMapPosition() const { return (x < 65535 && y < 65535 && z <= Otc::MAX_Z); }
|
||||
bool isMapPosition() const { return (x >=0 && y >= 0 && z >= 0 && x < 65535 && y < 65535 && z <= Otc::MAX_Z); }
|
||||
bool isValid() const { return !(x == 65535 && y == 65535 && z == 255); }
|
||||
float distance(const Position& pos) const { return sqrt(pow((pos.x - x), 2) + pow((pos.y - y), 2)); }
|
||||
int manhattanDistance(const Position& pos) const { return std::abs(pos.x - x) + std::abs(pos.y - y); }
|
||||
@@ -226,9 +226,9 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
uint16 x;
|
||||
uint16 y;
|
||||
uint8 z;
|
||||
int x;
|
||||
int y;
|
||||
short z;
|
||||
};
|
||||
|
||||
struct PositionHasher : std::unary_function<Position, std::size_t> {
|
||||
|
||||
Reference in New Issue
Block a user