Move src/util/net to src/net, src/server to src/net/server.
parent
4ac862956f
commit
4b3a3b36bc
|
@ -48,23 +48,23 @@ set(ZEPHA_SRC
|
|||
game/graph/scene/Scene.h
|
||||
game/ClientState.h
|
||||
game/scene/MainMenuScene.cpp
|
||||
game/scene/MainMenuScene.h
|
||||
server/Server.cpp
|
||||
server/Server.h
|
||||
util/net/Packet.cpp
|
||||
util/net/Packet.h
|
||||
game/scene/net/ClientNetworkInterpreter.cpp
|
||||
game/scene/net/ClientNetworkInterpreter.h
|
||||
game/scene/MainMenuScene.h
|
||||
net/server/Server.cpp
|
||||
net/server/Server.h
|
||||
net/Packet.cpp
|
||||
net/Packet.h
|
||||
net/client/ClientNetworkInterpreter.cpp
|
||||
net/client/ClientNetworkInterpreter.h
|
||||
def/gen/MapGen.cpp
|
||||
def/gen/MapGen.h
|
||||
util/net/NetHandler.cpp
|
||||
util/net/NetHandler.h
|
||||
def/gen/MapGen.h
|
||||
net/NetHandler.cpp
|
||||
net/NetHandler.h
|
||||
game/hud/GameGui.cpp
|
||||
game/hud/GameGui.h
|
||||
server/conn/ClientList.cpp
|
||||
server/conn/ClientList.h
|
||||
server/conn/ServerClient.h
|
||||
util/net/PacketChannel.h
|
||||
game/hud/GameGui.h
|
||||
net/server/conn/ClientList.cpp
|
||||
net/server/conn/ClientList.h
|
||||
net/server/conn/ServerClient.h
|
||||
net/PacketChannel.h
|
||||
game/entity/engine/PlayerEntity.h
|
||||
game/hud/components/basic/GuiRect.cpp
|
||||
game/hud/components/basic/GuiRect.h
|
||||
|
@ -79,11 +79,11 @@ set(ZEPHA_SRC
|
|||
game/graph/frustum/FrustumPlane.cpp
|
||||
game/graph/frustum/FrustumPlane.h
|
||||
game/graph/frustum/FrustumAABB.cpp
|
||||
game/graph/frustum/FrustumAABB.h
|
||||
server/world/ServerWorld.cpp
|
||||
server/world/ServerWorld.h
|
||||
server/world/ServerGenStream.cpp
|
||||
server/world/ServerGenStream.h
|
||||
game/graph/frustum/FrustumAABB.h
|
||||
net/server/world/ServerWorld.cpp
|
||||
net/server/world/ServerWorld.h
|
||||
net/server/world/ServerGenStream.cpp
|
||||
net/server/world/ServerGenStream.h
|
||||
game/scene/world/WorldInterpolationStream.cpp
|
||||
game/scene/world/WorldInterpolationStream.h
|
||||
util/Space.h
|
||||
|
@ -133,17 +133,17 @@ set(ZEPHA_SRC
|
|||
lua/Callback.h
|
||||
game/graph/shader/GuiUniforms.h
|
||||
game/graph/meshtypes/EntityMesh.cpp
|
||||
game/graph/meshtypes/EntityMesh.h
|
||||
server/conn/ServerClient.cpp
|
||||
server/config/ServerConfig.cpp
|
||||
server/config/ServerConfig.h
|
||||
util/net/PacketType.h
|
||||
util/net/NetState.h
|
||||
game/graph/meshtypes/EntityMesh.h
|
||||
net/server/conn/ServerClient.cpp
|
||||
net/server/config/ServerConfig.cpp
|
||||
net/server/config/ServerConfig.h
|
||||
net/PacketType.h
|
||||
net/NetState.h
|
||||
game/scene/ConnectScene.cpp
|
||||
game/scene/ConnectScene.h
|
||||
util/net/Address.h
|
||||
game/scene/net/ServerConnection.cpp
|
||||
game/scene/net/ServerConnection.h
|
||||
game/scene/ConnectScene.h
|
||||
net/Address.h
|
||||
net/client/ServerConnection.cpp
|
||||
net/client/ServerConnection.h
|
||||
game/scene/world/ChunkMeshDetails.h
|
||||
game/hud/components/GuiComponent.cpp
|
||||
game/hud/components/GuiComponent.h
|
||||
|
@ -151,9 +151,9 @@ set(ZEPHA_SRC
|
|||
game/hud/components/basic/GuiContainer.h
|
||||
lua/LuaModFile.h
|
||||
lua/LuaMod.h
|
||||
lua/LuaModConfig.h
|
||||
server/asset/ServerTexture.h
|
||||
server/asset/AssetStorage.h
|
||||
lua/LuaModConfig.h
|
||||
net/server/asset/ServerTexture.h
|
||||
net/server/asset/AssetStorage.h
|
||||
lua/LuaMod.cpp
|
||||
def/ItemDef.h
|
||||
def/DefinitionAtlas.cpp
|
||||
|
@ -196,8 +196,8 @@ set(ZEPHA_SRC
|
|||
lua/api/modules/add_entity.h
|
||||
lua/api/class/LocalLuaEntity.cpp
|
||||
lua/api/class/LocalLuaEntity.h
|
||||
def/model/SerializedModel.h
|
||||
server/asset/AssetType.h
|
||||
def/model/SerializedModel.h
|
||||
net/server/asset/AssetType.h
|
||||
def/model/ModelStore.h
|
||||
lua/api/modules/remove_entity.h
|
||||
lua/api/functions/update_entities.h
|
||||
|
@ -214,9 +214,9 @@ set(ZEPHA_SRC
|
|||
game/hud/components/basic/GuiInventoryItem.h
|
||||
game/inventory/ServerInventoryList.cpp
|
||||
game/inventory/ServerInventoryList.h
|
||||
game/inventory/ItemStack.h
|
||||
server/LocalServerInstance.cpp
|
||||
server/LocalServerInstance.h
|
||||
game/inventory/ItemStack.h
|
||||
net/server/LocalServerInstance.cpp
|
||||
net/server/LocalServerInstance.h
|
||||
game/hud/SerialGui.h
|
||||
util/Voronoi3D.cpp
|
||||
util/Voronoi3D.h
|
||||
|
@ -257,16 +257,16 @@ set(ZEPHA_SRC
|
|||
lua/api/usertype/cInventoryRef.h
|
||||
lua/api/usertype/cItemStack.h
|
||||
game/hud/components/basic/GuiModel.cpp
|
||||
game/hud/components/basic/GuiModel.h
|
||||
server/world/ServerEntity.cpp
|
||||
server/world/ServerEntity.h
|
||||
game/hud/components/basic/GuiModel.h
|
||||
net/server/world/ServerEntity.cpp
|
||||
net/server/world/ServerEntity.h
|
||||
lua/api/class/ServerLuaEntity.cpp
|
||||
lua/api/class/ServerLuaEntity.h
|
||||
game/scene/LuaErrorScene.cpp
|
||||
game/scene/LuaErrorScene.h
|
||||
lua/api/usertype/sLuaEntity.h
|
||||
util/net/Serializer.h
|
||||
util/net/Deserializer.h
|
||||
lua/api/usertype/sLuaEntity.h
|
||||
net/Serializer.h
|
||||
net/Deserializer.h
|
||||
lua/api/class/ServerLocalLuaEntity.cpp
|
||||
lua/api/class/ServerLocalLuaEntity.h
|
||||
lua/api/modules/register_item.h
|
||||
|
@ -300,8 +300,8 @@ set(ZEPHA_SRC
|
|||
lua/parser/ServerModHandler.cpp
|
||||
lua/parser/ServerModHandler.h
|
||||
lua/parser/LocalModHandler.cpp
|
||||
lua/parser/LocalModHandler.h
|
||||
game/scene/net/NetPlayerField.h
|
||||
lua/parser/LocalModHandler.h
|
||||
net/client/NetPlayerField.h
|
||||
game/inventory/LocalInventoryRefs.cpp
|
||||
game/inventory/LocalInventoryRefs.h
|
||||
game/inventory/LocalInventory.cpp
|
||||
|
@ -314,9 +314,9 @@ set(ZEPHA_SRC
|
|||
game/inventory/InventoryRefs.h
|
||||
game/inventory/InventoryList.cpp
|
||||
game/inventory/InventoryList.h
|
||||
lua/api/modules/time.h
|
||||
util/net/PacketView.cpp
|
||||
util/net/PacketView.h
|
||||
lua/api/modules/time.h
|
||||
net/PacketView.cpp
|
||||
net/PacketView.h
|
||||
lua/api/modules/create_structure.h
|
||||
util/Any.h
|
||||
def/gen/MapGenProps.cpp
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include "util/Log.h"
|
||||
#include "util/Util.h"
|
||||
#include "game/Client.h"
|
||||
#include "server/Server.h"
|
||||
#include "net/server/Server.h"
|
||||
|
||||
enum class Mode { INVALID, CLIENT, SERVER };
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include "ServerGame.h"
|
||||
|
||||
#include "../util/Log.h"
|
||||
#include "../server/conn/ClientList.h"
|
||||
#include "../net/server/conn/ClientList.h"
|
||||
|
||||
ServerGame::ServerGame(const std::string& subgame, unsigned int seed) :
|
||||
subgamePath("subgames/" + subgame + "/"),
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
#include "gen/ServerBiomeAtlas.h"
|
||||
#include "ServerDefinitionAtlas.h"
|
||||
#include "../server/asset/AssetStorage.h"
|
||||
#include "../net/server/asset/AssetStorage.h"
|
||||
#include "../lua/parser/ServerLuaParser.h"
|
||||
|
||||
class ServerWorld;
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
// Created by aurailus on 28/01/19.
|
||||
//
|
||||
|
||||
#include <random>
|
||||
#include <cmath>
|
||||
#include <random>
|
||||
|
||||
#include "MapGen.h"
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
#include "../util/Log.h"
|
||||
#include "../util/Timer.h"
|
||||
#include "../server/LocalServerInstance.h"
|
||||
#include "../net/server/LocalServerInstance.h"
|
||||
|
||||
#include "scene/GameScene.h"
|
||||
#include "scene/ConnectScene.h"
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
#include "ClientState.h"
|
||||
#include "graph/Renderer.h"
|
||||
#include "../util/net/Address.h"
|
||||
#include "../net/Address.h"
|
||||
#include "graph/scene/SceneManager.h"
|
||||
|
||||
class LocalServerInstance;
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#pragma once
|
||||
|
||||
#include "../def/ClientGame.h"
|
||||
#include "scene/net/ServerConnection.h"
|
||||
#include "../net/client/ServerConnection.h"
|
||||
|
||||
class Renderer;
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include "LocalInventory.h"
|
||||
|
||||
#include "LocalInventoryList.cpp"
|
||||
#include "../scene/net/ClientNetworkInterpreter.h"
|
||||
#include "../../net/client/ClientNetworkInterpreter.h"
|
||||
|
||||
void LocalInventory::createList(std::string name, unsigned short length, unsigned short width, bool maintain) {
|
||||
namespace ph = std::placeholders;
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
|
||||
#include "LocalInventory.h"
|
||||
#include "LocalInventoryList.h"
|
||||
#include "../../util/net/PacketView.h"
|
||||
#include "../../net/PacketView.h"
|
||||
#include "../../def/LocalDefinitionAtlas.h"
|
||||
#include "../scene/net/ClientNetworkInterpreter.h"
|
||||
#include "../../net/client/ClientNetworkInterpreter.h"
|
||||
|
||||
LocalInventoryRefs::LocalInventoryRefs(LocalDefinitionAtlas& defs, ClientNetworkInterpreter& net) : defs(defs) {
|
||||
namespace ph = std::placeholders;
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
|
||||
#include "ServerInventoryList.h"
|
||||
|
||||
#include "../../util/net/Packet.h"
|
||||
#include "../../util/net/Serializer.h"
|
||||
#include "../../server/conn/ClientList.h"
|
||||
#include "../../net/Packet.h"
|
||||
#include "../../net/Serializer.h"
|
||||
#include "../../lua/api/class/LuaItemStack.h"
|
||||
#include "../../net/server/conn/ClientList.h"
|
||||
|
||||
ServerInventoryList::ServerInventoryList(DefinitionAtlas& defs, ClientList* list,
|
||||
const std::string& invName, const std::string& listName, unsigned short size, unsigned short width) :
|
||||
|
|
|
@ -8,13 +8,13 @@
|
|||
|
||||
#include "../ClientState.h"
|
||||
#include "../graph/Renderer.h"
|
||||
#include "../../util/net/Packet.h"
|
||||
#include "../../util/net/Address.h"
|
||||
#include "../../util/net/PacketType.h"
|
||||
#include "../../util/net/PacketView.h"
|
||||
#include "../../server/asset/AssetType.h"
|
||||
#include "../../net/Packet.h"
|
||||
#include "../../net/Address.h"
|
||||
#include "../../net/PacketType.h"
|
||||
#include "../../net/PacketView.h"
|
||||
#include "../hud/components/basic/GuiText.h"
|
||||
#include "../hud/components/basic/GuiRect.h"
|
||||
#include "../../net/server/asset/AssetType.h"
|
||||
|
||||
ConnectScene::ConnectScene(ClientState &state, Address addr) : Scene(state),
|
||||
connection(state.connection) {
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
#include "GameScene.h"
|
||||
|
||||
#include "../ClientState.h"
|
||||
#include "../../net/Packet.h"
|
||||
#include "../graph/Renderer.h"
|
||||
#include "../../util/net/Packet.h"
|
||||
#include "../../util/net/PacketView.h"
|
||||
#include "../../net/PacketView.h"
|
||||
|
||||
GameScene::GameScene(ClientState& state) : Scene(state),
|
||||
game(state.defs),
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
#include "world/Player.h"
|
||||
#include "world/LocalWorld.h"
|
||||
#include "net/ClientNetworkInterpreter.h"
|
||||
#include "../../net/client/ClientNetworkInterpreter.h"
|
||||
#include "../inventory/LocalInventoryRefs.h"
|
||||
#include "../hud/DebugGui.h"
|
||||
|
||||
|
|
|
@ -5,11 +5,11 @@
|
|||
#include "LocalWorld.h"
|
||||
|
||||
#include "Player.h"
|
||||
#include "../../../net/PacketView.h"
|
||||
#include "WorldInterpolationStream.h"
|
||||
#include "../../../world/chunk/Chunk.h"
|
||||
#include "../../../def/item/BlockDef.h"
|
||||
#include "../../../util/net/PacketView.h"
|
||||
#include "../net/ClientNetworkInterpreter.h"
|
||||
#include "../../../net/client/ClientNetworkInterpreter.h"
|
||||
#include "../../entity/engine/ParticleEntity.h"
|
||||
#include "../../entity/engine/BlockCrackEntity.h"
|
||||
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
|
||||
#include "WorldInterpolationStream.h"
|
||||
|
||||
#include "../../../net/PacketView.h"
|
||||
#include "../../../def/ClientGame.h"
|
||||
#include "../../../def/gen/MapGen.h"
|
||||
#include "../../../world/chunk/Chunk.h"
|
||||
#include "../../../util/net/PacketView.h"
|
||||
|
||||
WorldInterpolationStream::WorldInterpolationStream(unsigned int seed, ClientGame& game) :
|
||||
props(std::make_shared<MapGenProps>(seed)),
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
#include "LuaMod.h"
|
||||
|
||||
#include "../util/net/PacketView.h"
|
||||
#include "../net/PacketView.h"
|
||||
|
||||
LuaMod LuaMod::fromPacket(PacketView& p) {
|
||||
LuaMod luaMod {};
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include <memory>
|
||||
#include <sol2/sol.hpp>
|
||||
|
||||
#include "../../../server/world/ServerEntity.h"
|
||||
#include "../../../net/server/world/ServerEntity.h"
|
||||
|
||||
class ServerGame;
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include "ServerLuaPlayer.h"
|
||||
|
||||
#include "../../LuaParser.h"
|
||||
#include "../../../util/net/NetHandler.h"
|
||||
#include "../../../net/NetHandler.h"
|
||||
|
||||
void ServerLuaPlayer::set_pos(const sol::table &pos) {
|
||||
player.assertPos({pos[1], pos[2], pos[3]});
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include <sol2/sol.hpp>
|
||||
|
||||
#include "ServerLuaInventory.h"
|
||||
#include "../../../server/conn/ServerClient.h"
|
||||
#include "../../../net/server/conn/ServerClient.h"
|
||||
|
||||
class ServerLuaPlayer {
|
||||
public:
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
#include "../class/LocalLuaEntity.h"
|
||||
#include "../class/ServerLuaEntity.h"
|
||||
#include "../../../def/ServerGame.h"
|
||||
#include "../../../server/world/ServerWorld.h"
|
||||
#include "../../../game/scene/world/LocalWorld.h"
|
||||
#include "../../../server/world/ServerEntity.h"
|
||||
#include "../../../net/server/world/ServerWorld.h"
|
||||
#include "../../../net/server/world/ServerEntity.h"
|
||||
|
||||
namespace Api {
|
||||
static int entities_ind = 0;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include "ServerLuaParser.h"
|
||||
|
||||
#include "../ErrorFormatter.h"
|
||||
#include "../../util/net/Serializer.h"
|
||||
#include "../../net/Serializer.h"
|
||||
#include "../register/RegisterBlocks.h"
|
||||
#include "../register/RegisterItems.h"
|
||||
#include "../register/RegisterBiomes.h"
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include <cute_files/cute_files.h>
|
||||
|
||||
#include "../../def/ServerGame.h"
|
||||
#include "../../util/net/Serializer.h"
|
||||
#include "../../net/Serializer.h"
|
||||
|
||||
#include "ServerModHandler.h"
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include "NetHandler.h"
|
||||
|
||||
#include "Address.h"
|
||||
#include "../Log.h"
|
||||
#include "../util/Log.h"
|
||||
|
||||
NetHandler::NetHandler(const Address& hostAddress) : NetHandler(std::move(hostAddress), 3, 3) {}
|
||||
|
|
@ -6,15 +6,15 @@
|
|||
|
||||
#include "ClientNetworkInterpreter.h"
|
||||
|
||||
#include "../PacketView.h"
|
||||
#include "../Serializer.h"
|
||||
#include "../NetHandler.h"
|
||||
#include "../../util/Log.h"
|
||||
#include "NetPlayerField.h"
|
||||
#include "../world/Player.h"
|
||||
#include "ServerConnection.h"
|
||||
#include "../../../util/Log.h"
|
||||
#include "../../entity/Model.h"
|
||||
#include "../world/LocalWorld.h"
|
||||
#include "../../../util/net/PacketView.h"
|
||||
#include "../../../util/net/Serializer.h"
|
||||
#include "../../../util/net/NetHandler.h"
|
||||
#include "../../game/entity/Model.h"
|
||||
#include "../../game/scene/world/Player.h"
|
||||
#include "../../game/scene/world/LocalWorld.h"
|
||||
|
||||
ClientNetworkInterpreter::ClientNetworkInterpreter(ServerConnection &connection, ClientGame &defs, Player& player) :
|
||||
player(player),
|
|
@ -7,9 +7,9 @@
|
|||
|
||||
#include "ServerConnection.h"
|
||||
|
||||
#include "../../../util/Log.h"
|
||||
#include "../../../util/net/Address.h"
|
||||
#include "../../../util/net/NetHandler.h"
|
||||
#include "../../util/Log.h"
|
||||
#include "../../net/Address.h"
|
||||
#include "../../net/NetHandler.h"
|
||||
|
||||
void ServerConnection::attemptConnect(Address addr) {
|
||||
if (state != State::UNCONNECTED) {
|
|
@ -3,7 +3,7 @@
|
|||
//
|
||||
|
||||
#include "LocalServerInstance.h"
|
||||
#include "../util/Log.h"
|
||||
#include "../../util/Log.h"
|
||||
#include "Server.h"
|
||||
#include <iostream>
|
||||
|
|
@ -7,13 +7,13 @@
|
|||
|
||||
#include "Server.h"
|
||||
|
||||
#include "../util/Log.h"
|
||||
#include "../util/Timer.h"
|
||||
#include "../def/item/BlockDef.h"
|
||||
#include "../util/net/Serializer.h"
|
||||
#include "../util/net/PacketView.h"
|
||||
#include "../util/net/PacketChannel.h"
|
||||
#include "../lua/api/class/ServerLuaPlayer.h"
|
||||
#include "../Serializer.h"
|
||||
#include "../PacketView.h"
|
||||
#include "../../util/Log.h"
|
||||
#include "../../util/Timer.h"
|
||||
#include "../PacketChannel.h"
|
||||
#include "../../def/item/BlockDef.h"
|
||||
#include "../../lua/api/class/ServerLuaPlayer.h"
|
||||
|
||||
Server::Server(unsigned short port, const std::string& subgame) :
|
||||
seed(69),
|
|
@ -4,12 +4,12 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "../NetHandler.h"
|
||||
#include "conn/ClientList.h"
|
||||
#include "world/ServerWorld.h"
|
||||
#include "../def/ServerGame.h"
|
||||
#include "config/ServerConfig.h"
|
||||
#include "../util/net/NetHandler.h"
|
||||
#include "../game/inventory/InventoryRefs.h"
|
||||
#include "../../def/ServerGame.h"
|
||||
#include "../../game/inventory/InventoryRefs.h"
|
||||
|
||||
class ServerClient;
|
||||
class Packet;
|
|
@ -7,7 +7,7 @@
|
|||
#include <vector>
|
||||
|
||||
#include "ServerTexture.h"
|
||||
#include "../../def/model/SerializedModel.h"
|
||||
#include "../../../def/model/SerializedModel.h"
|
||||
|
||||
class AssetStorage {
|
||||
public:
|
|
@ -4,12 +4,12 @@
|
|||
|
||||
#include "ServerConfig.h"
|
||||
|
||||
#include "../../def/ItemDef.h"
|
||||
#include "../../PacketView.h"
|
||||
#include "../../Serializer.h"
|
||||
#include "../asset/AssetType.h"
|
||||
#include "../conn/ServerClient.h"
|
||||
#include "../../def/gen/BiomeDef.h"
|
||||
#include "../../util/net/PacketView.h"
|
||||
#include "../../util/net/Serializer.h"
|
||||
#include "../../../def/ItemDef.h"
|
||||
#include "../../../def/gen/BiomeDef.h"
|
||||
|
||||
ServerConfig::ServerConfig(ServerGame &defs) : game(defs) {}
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "../../def/ServerGame.h"
|
||||
#include "../../../def/ServerGame.h"
|
||||
|
||||
class ServerClient;
|
||||
|
|
@ -6,11 +6,11 @@
|
|||
|
||||
#include "ClientList.h"
|
||||
|
||||
#include "../../util/Log.h"
|
||||
#include "../../def/ServerGame.h"
|
||||
#include "../../util/net/Serializer.h"
|
||||
#include "../../util/net/NetHandler.h"
|
||||
#include "../../game/scene/net/NetPlayerField.h"
|
||||
#include "../../Serializer.h"
|
||||
#include "../../NetHandler.h"
|
||||
#include "../../../util/Log.h"
|
||||
#include "../../../def/ServerGame.h"
|
||||
#include "../../client/NetPlayerField.h"
|
||||
|
||||
ClientList::ClientList(ServerGame& defs) :
|
||||
defs(defs) {}
|
|
@ -7,7 +7,7 @@
|
|||
#include <vector>
|
||||
|
||||
#include "ServerClient.h"
|
||||
#include "../../lua/parser/ServerLuaParser.h"
|
||||
#include "../../../lua/parser/ServerLuaParser.h"
|
||||
|
||||
class ClientList {
|
||||
public:
|
|
@ -6,10 +6,10 @@
|
|||
|
||||
#include "ServerClient.h"
|
||||
|
||||
#include "../../util/net/Packet.h"
|
||||
#include "../../util/net/Serializer.h"
|
||||
#include "../../game/inventory/InventoryRefs.h"
|
||||
#include "../../game/scene/net/NetPlayerField.h"
|
||||
#include "../../Packet.h"
|
||||
#include "../../Serializer.h"
|
||||
#include "../../client/NetPlayerField.h"
|
||||
#include "../../../game/inventory/InventoryRefs.h"
|
||||
|
||||
ServerClient::ServerClient(ENetPeer *peer, ENetAddress address, DefinitionAtlas& defs, InventoryRefs& refs) :
|
||||
peer(peer),
|
|
@ -8,9 +8,9 @@
|
|||
#include <glm/vec3.hpp>
|
||||
#include <unordered_map>
|
||||
|
||||
#include "../../util/Vec.h"
|
||||
#include "../../game/inventory/Inventory.h"
|
||||
#include "../../game/inventory/ServerInventoryList.h"
|
||||
#include "../../../util/Vec.h"
|
||||
#include "../../../game/inventory/Inventory.h"
|
||||
#include "../../../game/inventory/ServerInventoryList.h"
|
||||
|
||||
class InventoryRefs;
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
#include "ServerEntity.h"
|
||||
|
||||
#include "../../util/net/Serializer.h"
|
||||
#include "../../Serializer.h"
|
||||
|
||||
void ServerEntity::setPos(glm::vec3 position) {
|
||||
this->position = position;
|
|
@ -7,7 +7,7 @@
|
|||
#include <string>
|
||||
#include <glm/vec3.hpp>
|
||||
|
||||
#include "../../util/net/Packet.h"
|
||||
#include "../../Packet.h"
|
||||
|
||||
class ServerEntity {
|
||||
public:
|
|
@ -4,9 +4,9 @@
|
|||
|
||||
#include "ServerGenStream.h"
|
||||
|
||||
#include "../../def/ServerGame.h"
|
||||
#include "../../world/chunk/Chunk.h"
|
||||
#include "../../def/gen/MapGenProps.h"
|
||||
#include "../../../def/ServerGame.h"
|
||||
#include "../../../world/chunk/Chunk.h"
|
||||
#include "../../../def/gen/MapGenProps.h"
|
||||
|
||||
ServerGenStream::ServerGenStream(unsigned int seed, ServerGame& game) :
|
||||
props(std::make_shared<MapGenProps>(seed)),
|
|
@ -8,7 +8,7 @@
|
|||
#include <thread>
|
||||
#include <unordered_set>
|
||||
|
||||
#include "../../def/gen/MapGen.h"
|
||||
#include "../../../def/gen/MapGen.h"
|
||||
|
||||
class ServerGame;
|
||||
|
|
@ -2,23 +2,23 @@
|
|||
// Created by aurailus on 05/03/19.
|
||||
//
|
||||
|
||||
#include <iostream>
|
||||
#include <glm/glm.hpp>
|
||||
#include <unordered_map>
|
||||
#include <iostream>
|
||||
|
||||
#include "ServerWorld.h"
|
||||
|
||||
#include "ServerGenStream.h"
|
||||
#include "../../PacketType.h"
|
||||
#include "../../Serializer.h"
|
||||
#include "../conn/ClientList.h"
|
||||
#include "../conn/ServerClient.h"
|
||||
#include "../../def/ServerGame.h"
|
||||
#include "../../def/item/BlockDef.h"
|
||||
#include "../../world/chunk/Chunk.h"
|
||||
#include "../../util/net/PacketType.h"
|
||||
#include "../../util/net/Serializer.h"
|
||||
#include "../../world/chunk/MapBlock.h"
|
||||
#include "../../world/fs/FileManipulator.h"
|
||||
#include "../../lua/api/class/ServerLuaEntity.h"
|
||||
#include "../../../def/ServerGame.h"
|
||||
#include "../../../def/item/BlockDef.h"
|
||||
#include "../../../world/chunk/Chunk.h"
|
||||
#include "../../../world/chunk/MapBlock.h"
|
||||
#include "../../../world/fs/FileManipulator.h"
|
||||
#include "../../../lua/api/class/ServerLuaEntity.h"
|
||||
|
||||
ServerWorld::ServerWorld(unsigned int seed, ServerGame& game, ClientList& clients) :
|
||||
clientList(clients),
|
|
@ -6,9 +6,9 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "../../game/scene/world/World.h"
|
||||
#include "../../../game/scene/world/World.h"
|
||||
|
||||
#include "../../world/ServerDimension.h"
|
||||
#include "../../../world/ServerDimension.h"
|
||||
|
||||
class ServerGame;
|
||||
class ClientList;
|
|
@ -4,10 +4,10 @@
|
|||
|
||||
#include "LocalDimension.h"
|
||||
|
||||
#include "../net/PacketView.h"
|
||||
#include "../world/chunk/Chunk.h"
|
||||
#include "../world/chunk/Region.h"
|
||||
#include "../game/graph/Renderer.h"
|
||||
#include "../util/net/PacketView.h"
|
||||
#include "../world/chunk/MapBlock.h"
|
||||
#include "../lua/api/class/LocalLuaEntity.h"
|
||||
#include "../game/scene/world/MeshGenStream.h"
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
#include "chunk/MapBlock.h"
|
||||
#include "../def/gen/MapGen.h"
|
||||
#include "../def/ServerGame.h"
|
||||
#include "../server/conn/ServerClient.h"
|
||||
#include "../server/world/ServerWorld.h"
|
||||
#include "../net/server/conn/ServerClient.h"
|
||||
#include "../net/server/world/ServerWorld.h"
|
||||
#include "../lua/api/class/ServerLuaEntity.h"
|
||||
|
||||
ServerDimension::ServerDimension(ServerGame &game) : Dimension(game.defs), game(game) {}
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
#include "Chunk.h"
|
||||
|
||||
#include "../../def/DefinitionAtlas.h"
|
||||
#include "../../util/net/Serializer.h"
|
||||
#include "../../util/net/Deserializer.h"
|
||||
#include "../../net/Serializer.h"
|
||||
#include "../../net/Deserializer.h"
|
||||
|
||||
Chunk::Chunk(const std::vector<unsigned int>& blocks, const std::vector<unsigned short>& biomes) :
|
||||
Chunk(blocks, biomes, {0, 0, 0}) {}
|
||||
|
|
|
@ -17,16 +17,14 @@
|
|||
#include "FileManipulator.h"
|
||||
|
||||
#include "../chunk/Chunk.h"
|
||||
#include "../../util/Util.h"
|
||||
#include "../../util/net/Serializer.h"
|
||||
#include "../../util/net/Deserializer.h"
|
||||
#include "../../net/Serializer.h"
|
||||
#include "../../net/Deserializer.h"
|
||||
|
||||
FileManipulator::FileManipulator(const std::string &worldPath) :
|
||||
path(worldPath) {
|
||||
}
|
||||
|
||||
void FileManipulator::commitChunk(Chunk &chunk) {
|
||||
// return;
|
||||
glm::ivec3 reg = Space::Region::world::fromChunk(chunk.pos);
|
||||
unsigned int chunkInd = Space::Chunk::index(chunk.pos);
|
||||
|
||||
|
|
Loading…
Reference in New Issue