Small fixes.
This commit is contained in:
parent
2a4fa9641d
commit
23be33492e
@ -23,7 +23,7 @@
|
||||
#include "Network.hpp"
|
||||
#include "Recipe.hpp"
|
||||
|
||||
struct Client;
|
||||
class Client;
|
||||
|
||||
class Registry : public ISerializable {
|
||||
public:
|
||||
|
@ -18,6 +18,8 @@ namespace sf { class Packet; }
|
||||
|
||||
class ISerializable {
|
||||
public:
|
||||
virtual ~ISerializable() = default;
|
||||
|
||||
virtual void serialize(sf::Packet &packet) = 0;
|
||||
virtual void deserialize(sf::Packet &packet) = 0;
|
||||
};
|
||||
|
@ -20,6 +20,8 @@
|
||||
|
||||
class World {
|
||||
public:
|
||||
virtual ~World() = default;
|
||||
|
||||
virtual BlockData *getBlockData(int x, int y, int z) const = 0;
|
||||
|
||||
virtual u16 getBlock(int x, int y, int z) const = 0;
|
||||
|
@ -24,21 +24,22 @@
|
||||
|
||||
#include "NetworkInputHandler.hpp"
|
||||
|
||||
struct Client {
|
||||
Client(u16 _id, sf::IpAddress _address, u16 _port, const std::shared_ptr<sf::TcpSocket> &socket)
|
||||
: id(_id), address(_address), port(_port), tcpSocket(socket) {}
|
||||
class Client {
|
||||
public:
|
||||
Client(u16 _id, sf::IpAddress _address, u16 _port, const std::shared_ptr<sf::TcpSocket> &socket)
|
||||
: id(_id), address(_address), port(_port), tcpSocket(socket) {}
|
||||
|
||||
u16 id;
|
||||
bool isReady = false;
|
||||
u16 id;
|
||||
bool isReady = false;
|
||||
|
||||
sf::IpAddress address;
|
||||
u16 port;
|
||||
sf::IpAddress address;
|
||||
u16 port;
|
||||
|
||||
u32 previousKeyTimestamp = 0;
|
||||
u32 previousKeyTimestamp = 0;
|
||||
|
||||
std::shared_ptr<sf::TcpSocket> tcpSocket;
|
||||
std::shared_ptr<sf::TcpSocket> tcpSocket;
|
||||
|
||||
NetworkInputHandler inputHandler;
|
||||
NetworkInputHandler inputHandler;
|
||||
};
|
||||
|
||||
class ServerInfo {
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
#include "Block.hpp"
|
||||
|
||||
struct Client;
|
||||
class Client;
|
||||
class Server;
|
||||
|
||||
class ServerBlock : public Block {
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include "ServerChunk.hpp"
|
||||
#include "World.hpp"
|
||||
|
||||
struct Client;
|
||||
class Client;
|
||||
class Server;
|
||||
class ServerPlayer;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user