indent with tabs
This commit is contained in:
@@ -136,7 +136,8 @@ private:
|
|||||||
bool m_IsBigTower;
|
bool m_IsBigTower;
|
||||||
public:
|
public:
|
||||||
TowerInfo(std::string&& name, std::string&& description, bool big) : m_Name(std::move(name)),
|
TowerInfo(std::string&& name, std::string&& description, bool big) : m_Name(std::move(name)),
|
||||||
m_Description(std::move(description)), m_IsBigTower(big) {}
|
m_Description(std::move(description)), m_IsBigTower(big) {
|
||||||
|
}
|
||||||
|
|
||||||
const std::string& GetName() const { return m_Name; }
|
const std::string& GetName() const { return m_Name; }
|
||||||
const std::string& GetDescription() const { return m_Description; }
|
const std::string& GetDescription() const { return m_Description; }
|
||||||
|
|||||||
@@ -11,8 +11,7 @@ namespace server {
|
|||||||
|
|
||||||
class Server;
|
class Server;
|
||||||
|
|
||||||
struct KeepAlive
|
struct KeepAlive {
|
||||||
{
|
|
||||||
std::uint64_t keepAliveID = 0;
|
std::uint64_t keepAliveID = 0;
|
||||||
std::uint64_t sendTime;
|
std::uint64_t sendTime;
|
||||||
bool recievedResponse = false;
|
bool recievedResponse = false;
|
||||||
|
|||||||
@@ -424,7 +424,8 @@ public:
|
|||||||
SpawnMobPacket() {}
|
SpawnMobPacket() {}
|
||||||
SpawnMobPacket(game::MobID id, game::MobType type, std::uint8_t level, game::PlayerID sender,
|
SpawnMobPacket(game::MobID id, game::MobType type, std::uint8_t level, game::PlayerID sender,
|
||||||
float x, float y, game::Direction dir) : m_MobID(id), m_MobType(type), m_MobLevel(level),
|
float x, float y, game::Direction dir) : m_MobID(id), m_MobType(type), m_MobLevel(level),
|
||||||
m_MobDirection(dir), m_Sender(sender), m_MobX(x), m_MobY(y) {}
|
m_MobDirection(dir), m_Sender(sender), m_MobX(x), m_MobY(y) {
|
||||||
|
}
|
||||||
virtual ~SpawnMobPacket() {}
|
virtual ~SpawnMobPacket() {}
|
||||||
|
|
||||||
virtual DataBuffer Serialize(bool packetID = true) const;
|
virtual DataBuffer Serialize(bool packetID = true) const;
|
||||||
@@ -449,7 +450,8 @@ private:
|
|||||||
public:
|
public:
|
||||||
PlaceTowerPacket() {}
|
PlaceTowerPacket() {}
|
||||||
PlaceTowerPacket(std::int32_t x, std::int32_t y, game::TowerType type) :
|
PlaceTowerPacket(std::int32_t x, std::int32_t y, game::TowerType type) :
|
||||||
m_TowerX(x), m_TowerY(y), m_TowerType(type) {}
|
m_TowerX(x), m_TowerY(y), m_TowerType(type) {
|
||||||
|
}
|
||||||
virtual ~PlaceTowerPacket() {}
|
virtual ~PlaceTowerPacket() {}
|
||||||
|
|
||||||
virtual DataBuffer Serialize(bool packetID = true) const;
|
virtual DataBuffer Serialize(bool packetID = true) const;
|
||||||
@@ -472,7 +474,8 @@ private:
|
|||||||
public:
|
public:
|
||||||
WorldAddTowerPacket() {}
|
WorldAddTowerPacket() {}
|
||||||
WorldAddTowerPacket(game::TowerID id, std::int32_t x, std::int32_t y, game::TowerType type, game::PlayerID player) :
|
WorldAddTowerPacket(game::TowerID id, std::int32_t x, std::int32_t y, game::TowerType type, game::PlayerID player) :
|
||||||
m_TowerID(id), m_TowerX(x), m_TowerY(y), m_TowerType(type), m_Builder(player) {}
|
m_TowerID(id), m_TowerX(x), m_TowerY(y), m_TowerType(type), m_Builder(player) {
|
||||||
|
}
|
||||||
virtual ~WorldAddTowerPacket() {}
|
virtual ~WorldAddTowerPacket() {}
|
||||||
|
|
||||||
virtual DataBuffer Serialize(bool packetID = true) const;
|
virtual DataBuffer Serialize(bool packetID = true) const;
|
||||||
@@ -534,7 +537,8 @@ private:
|
|||||||
public:
|
public:
|
||||||
MobState() {}
|
MobState() {}
|
||||||
MobState(game::MobID id, const Point& position, float life, game::Direction direction) :
|
MobState(game::MobID id, const Point& position, float life, game::Direction direction) :
|
||||||
m_MobID(id), m_MobPosition(position), m_MobLife(life), m_MobDirection(direction) {}
|
m_MobID(id), m_MobPosition(position), m_MobLife(life), m_MobDirection(direction) {
|
||||||
|
}
|
||||||
|
|
||||||
game::MobID GetMobId() const { return m_MobID; }
|
game::MobID GetMobId() const { return m_MobID; }
|
||||||
Point GetMobPosition() const { return m_MobPosition; }
|
Point GetMobPosition() const { return m_MobPosition; }
|
||||||
|
|||||||
@@ -16,8 +16,7 @@ Socket::Socket(Type type)
|
|||||||
: m_Blocking(false),
|
: m_Blocking(false),
|
||||||
m_Type(type),
|
m_Type(type),
|
||||||
m_Status(Disconnected),
|
m_Status(Disconnected),
|
||||||
m_Handle(static_cast<SocketHandle>(INVALID_SOCKET))
|
m_Handle(static_cast<SocketHandle>(INVALID_SOCKET)) {
|
||||||
{
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,8 +12,7 @@ namespace td {
|
|||||||
namespace network {
|
namespace network {
|
||||||
|
|
||||||
UDPSocket::UDPSocket()
|
UDPSocket::UDPSocket()
|
||||||
: Socket(Socket::UDP), m_Port(0)
|
: Socket(Socket::UDP), m_Port(0) {
|
||||||
{
|
|
||||||
m_Handle = ::socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
|
m_Handle = ::socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user