diff --git a/src/Abilities.cpp b/src/Abilities.cpp index 54f8c91..691f486 100644 --- a/src/Abilities.cpp +++ b/src/Abilities.cpp @@ -1,10 +1,7 @@ #include "Abilities.hpp" -#include "PlayerManager.hpp" -#include "Player.hpp" + #include "NPCManager.hpp" -#include "Nanos.hpp" -#include "Groups.hpp" -#include "Eggs.hpp" +#include "PlayerManager.hpp" std::map Abilities::SkillTable; diff --git a/src/Abilities.hpp b/src/Abilities.hpp index 27c376b..834c605 100644 --- a/src/Abilities.hpp +++ b/src/Abilities.hpp @@ -1,7 +1,9 @@ #pragma once -#include "core/Core.hpp" -#include "Combat.hpp" +#include "Entities.hpp" + +#include +#include enum class SkillEffectTarget { POINT = 1, diff --git a/src/Buddies.cpp b/src/Buddies.cpp index 25f19cc..e1e6a02 100644 --- a/src/Buddies.cpp +++ b/src/Buddies.cpp @@ -1,15 +1,10 @@ -#include "servers/CNShardServer.hpp" #include "Buddies.hpp" -#include "PlayerManager.hpp" -#include "Buddies.hpp" -#include "db/Database.hpp" -#include "Items.hpp" -#include "db/Database.hpp" -#include -#include -#include -#include +#include "db/Database.hpp" +#include "servers/CNShardServer.hpp" + +#include "Player.hpp" +#include "PlayerManager.hpp" using namespace Buddies; diff --git a/src/Buddies.hpp b/src/Buddies.hpp index e7f9d2e..f0bc455 100644 --- a/src/Buddies.hpp +++ b/src/Buddies.hpp @@ -1,7 +1,5 @@ #pragma once -#include "Player.hpp" -#include "core/Core.hpp" #include "core/Core.hpp" namespace Buddies { diff --git a/src/BuiltinCommands.cpp b/src/BuiltinCommands.cpp index 356992a..e36b2a4 100644 --- a/src/BuiltinCommands.cpp +++ b/src/BuiltinCommands.cpp @@ -1,10 +1,13 @@ #include "BuiltinCommands.hpp" + +#include "servers/CNShardServer.hpp" + +#include "Player.hpp" #include "PlayerManager.hpp" -#include "Chat.hpp" #include "Items.hpp" #include "Missions.hpp" +#include "Chat.hpp" #include "Nanos.hpp" -#include "Rand.hpp" // helper function, not a packet handler void BuiltinCommands::setSpecialState(CNSocket* sock, CNPacketData* data) { diff --git a/src/Chat.cpp b/src/Chat.cpp index f692a3e..51d4222 100644 --- a/src/Chat.cpp +++ b/src/Chat.cpp @@ -1,6 +1,9 @@ #include "Chat.hpp" + +#include "servers/CNShardServer.hpp" + +#include "Player.hpp" #include "PlayerManager.hpp" -#include "Groups.hpp" #include "CustomCommands.hpp" #include diff --git a/src/Chat.hpp b/src/Chat.hpp index acaca06..26b4236 100644 --- a/src/Chat.hpp +++ b/src/Chat.hpp @@ -2,7 +2,10 @@ #define CMD_PREFIX '/' -#include "servers/CNShardServer.hpp" +#include "core/Core.hpp" + +#include +#include namespace Chat { extern std::vector dump; diff --git a/src/Chunking.cpp b/src/Chunking.cpp index 6e96c0a..71ce013 100644 --- a/src/Chunking.cpp +++ b/src/Chunking.cpp @@ -1,9 +1,9 @@ #include "Chunking.hpp" -#include "PlayerManager.hpp" + +#include "MobAI.hpp" #include "NPCManager.hpp" -#include "settings.hpp" -#include "Combat.hpp" -#include "Eggs.hpp" + +#include using namespace Chunking; diff --git a/src/Chunking.hpp b/src/Chunking.hpp index 61ead49..3673638 100644 --- a/src/Chunking.hpp +++ b/src/Chunking.hpp @@ -1,12 +1,10 @@ #pragma once -#include "core/Core.hpp" +#include "Entities.hpp" -#include #include #include -#include -#include +#include struct EntityRef; diff --git a/src/Combat.cpp b/src/Combat.cpp index fe01499..b3ad7af 100644 --- a/src/Combat.cpp +++ b/src/Combat.cpp @@ -1,14 +1,13 @@ #include "Combat.hpp" -#include "PlayerManager.hpp" -#include "Nanos.hpp" -#include "NPCManager.hpp" -#include "Items.hpp" -#include "Missions.hpp" -#include "Groups.hpp" -#include "Transport.hpp" -#include "Racing.hpp" -#include "Abilities.hpp" + +#include "servers/CNShardServer.hpp" + #include "Rand.hpp" +#include "Player.hpp" +#include "PlayerManager.hpp" +#include "NPCManager.hpp" +#include "Nanos.hpp" +#include "Abilities.hpp" #include diff --git a/src/Combat.hpp b/src/Combat.hpp index 5b53c86..a4868d3 100644 --- a/src/Combat.hpp +++ b/src/Combat.hpp @@ -1,14 +1,10 @@ #pragma once -#include "core/Core.hpp" -#include "servers/CNShardServer.hpp" +#include "Player.hpp" #include "MobAI.hpp" -#include "JSON.hpp" - #include -#include -#include +#include struct Bullet { int pointDamage; @@ -17,8 +13,6 @@ struct Bullet { int bulletType; }; - - namespace Combat { extern std::map> Bullets; diff --git a/src/CustomCommands.cpp b/src/CustomCommands.cpp index 36e0108..3b48907 100644 --- a/src/CustomCommands.cpp +++ b/src/CustomCommands.cpp @@ -1,18 +1,18 @@ #include "CustomCommands.hpp" -#include "Chat.hpp" + +#include "db/Database.hpp" + +#include "Player.hpp" #include "PlayerManager.hpp" +#include "Chat.hpp" #include "TableData.hpp" #include "NPCManager.hpp" -#include "Eggs.hpp" #include "MobAI.hpp" -#include "Items.hpp" -#include "db/Database.hpp" -#include "Transport.hpp" #include "Missions.hpp" +#include "Eggs.hpp" +#include "Items.hpp" #include -#include -#include #include typedef void (*CommandHandler)(std::string fullString, std::vector& args, CNSocket* sock); diff --git a/src/CustomCommands.hpp b/src/CustomCommands.hpp index 62103da..ae9ea7b 100644 --- a/src/CustomCommands.hpp +++ b/src/CustomCommands.hpp @@ -2,6 +2,8 @@ #include "core/Core.hpp" +#include + namespace CustomCommands { void init(); diff --git a/src/Eggs.cpp b/src/Eggs.cpp index ca82b54..cddf6b4 100644 --- a/src/Eggs.cpp +++ b/src/Eggs.cpp @@ -1,10 +1,13 @@ -#include "core/Core.hpp" #include "Eggs.hpp" + +#include "servers/CNShardServer.hpp" + +#include "Player.hpp" #include "PlayerManager.hpp" -#include "Items.hpp" -#include "Nanos.hpp" #include "Abilities.hpp" -#include "Groups.hpp" +#include "NPCManager.hpp" +#include "Entities.hpp" +#include "Items.hpp" #include diff --git a/src/Eggs.hpp b/src/Eggs.hpp index 2155272..eeea678 100644 --- a/src/Eggs.hpp +++ b/src/Eggs.hpp @@ -1,7 +1,6 @@ #pragma once #include "core/Core.hpp" -#include "Entities.hpp" struct EggType { int dropCrateId; diff --git a/src/Email.cpp b/src/Email.cpp index 4de3766..be58012 100644 --- a/src/Email.cpp +++ b/src/Email.cpp @@ -1,9 +1,9 @@ #include "Email.hpp" #include "core/Core.hpp" +#include "db/Database.hpp" #include "servers/CNShardServer.hpp" -#include "db/Database.hpp" #include "PlayerManager.hpp" #include "Items.hpp" #include "Chat.hpp" diff --git a/src/Entities.cpp b/src/Entities.cpp index ff63053..a8c53b1 100644 --- a/src/Entities.cpp +++ b/src/Entities.cpp @@ -1,12 +1,9 @@ -#include "core/Core.hpp" #include "Entities.hpp" -#include "Chunking.hpp" -#include "PlayerManager.hpp" -#include "NPCManager.hpp" -#include "Eggs.hpp" -#include "MobAI.hpp" -#include +#include "NPCManager.hpp" +#include "PlayerManager.hpp" + +#include static_assert(std::is_standard_layout::value); static_assert(std::is_trivially_copyable::value); diff --git a/src/Entities.hpp b/src/Entities.hpp index f3f061a..1b02f0b 100644 --- a/src/Entities.hpp +++ b/src/Entities.hpp @@ -3,8 +3,8 @@ #include "core/Core.hpp" #include "Chunking.hpp" -#include #include +#include enum EntityKind { INVALID, diff --git a/src/Groups.cpp b/src/Groups.cpp index f3bf7d8..5655b54 100644 --- a/src/Groups.cpp +++ b/src/Groups.cpp @@ -1,13 +1,9 @@ -#include "servers/CNShardServer.hpp" -#include "PlayerManager.hpp" #include "Groups.hpp" -#include "Nanos.hpp" -#include "Abilities.hpp" -#include -#include -#include -#include +#include "servers/CNShardServer.hpp" + +#include "Player.hpp" +#include "PlayerManager.hpp" /* * NOTE: Variadic response packets that list group members are technically diff --git a/src/Groups.hpp b/src/Groups.hpp index c694597..18cf6e5 100644 --- a/src/Groups.hpp +++ b/src/Groups.hpp @@ -1,14 +1,13 @@ #pragma once -#include "core/Core.hpp" -#include "servers/CNShardServer.hpp" #include "Entities.hpp" +#include #include #include +/* forward declaration(s) */ struct Player; -enum EntityKind; struct Group { std::vector members; diff --git a/src/Items.cpp b/src/Items.cpp index 166526b..fc993e2 100644 --- a/src/Items.cpp +++ b/src/Items.cpp @@ -1,16 +1,18 @@ -#include "servers/CNShardServer.hpp" #include "Items.hpp" + +#include "servers/CNShardServer.hpp" + +#include "Player.hpp" #include "PlayerManager.hpp" #include "Nanos.hpp" -#include "NPCManager.hpp" -#include "Player.hpp" #include "Abilities.hpp" -#include "Missions.hpp" #include "Eggs.hpp" -#include "Rand.hpp" +#include "MobAI.hpp" +#include "Missions.hpp" #include // for memset() #include +#include using namespace Items; diff --git a/src/Items.hpp b/src/Items.hpp index 97c7733..2156b92 100644 --- a/src/Items.hpp +++ b/src/Items.hpp @@ -1,9 +1,13 @@ #pragma once -#include "servers/CNShardServer.hpp" +#include "core/Core.hpp" + #include "Player.hpp" -#include "MobAI.hpp" #include "Rand.hpp" +#include "MobAI.hpp" + +#include +#include struct CrocPotEntry { int multStats, multLooks; diff --git a/src/Missions.cpp b/src/Missions.cpp index 890bec5..db0d17c 100644 --- a/src/Missions.cpp +++ b/src/Missions.cpp @@ -1,11 +1,10 @@ -#include "servers/CNShardServer.hpp" #include "Missions.hpp" -#include "PlayerManager.hpp" -#include "Nanos.hpp" -#include "Items.hpp" -#include "Transport.hpp" -#include "string.h" +#include "servers/CNShardServer.hpp" + +#include "PlayerManager.hpp" +#include "Items.hpp" +#include "Nanos.hpp" using namespace Missions; diff --git a/src/Missions.hpp b/src/Missions.hpp index 4e572a6..46eaa4c 100644 --- a/src/Missions.hpp +++ b/src/Missions.hpp @@ -1,9 +1,11 @@ #pragma once -#include "servers/CNShardServer.hpp" +#include "core/Core.hpp" +#include "JSON.hpp" + #include "Player.hpp" -#include "JSON.hpp" +#include struct Reward { int32_t id; diff --git a/src/MobAI.cpp b/src/MobAI.cpp index 55d6747..7313b85 100644 --- a/src/MobAI.cpp +++ b/src/MobAI.cpp @@ -1,13 +1,16 @@ #include "MobAI.hpp" -#include "Player.hpp" + +#include "Chunking.hpp" +#include "NPCManager.hpp" +#include "Entities.hpp" +#include "PlayerManager.hpp" #include "Racing.hpp" -#include "Transport.hpp" #include "Nanos.hpp" -#include "Combat.hpp" #include "Abilities.hpp" -#include "Rand.hpp" +#include "Combat.hpp" #include "Items.hpp" #include "Missions.hpp" +#include "Rand.hpp" #include #include diff --git a/src/MobAI.hpp b/src/MobAI.hpp index cb6bfc8..0941919 100644 --- a/src/MobAI.hpp +++ b/src/MobAI.hpp @@ -1,11 +1,13 @@ #pragma once #include "core/Core.hpp" -#include "NPCManager.hpp" +#include "JSON.hpp" + #include "Entities.hpp" -/* kill me */ -struct Mob; +#include +#include + namespace MobAI { void deadStep(CombatNPC* self, time_t currTime); void combatStep(CombatNPC* self, time_t currTime); diff --git a/src/NPCManager.cpp b/src/NPCManager.cpp index ee38ece..5baddb6 100644 --- a/src/NPCManager.cpp +++ b/src/NPCManager.cpp @@ -1,4 +1,8 @@ #include "NPCManager.hpp" + +#include "servers/CNShardServer.hpp" + +#include "PlayerManager.hpp" #include "Items.hpp" #include "settings.hpp" #include "Combat.hpp" @@ -20,8 +24,6 @@ #include #include -#include "JSON.hpp" - using namespace NPCManager; std::unordered_map NPCManager::NPCs; diff --git a/src/NPCManager.hpp b/src/NPCManager.hpp index d390e3b..3429d42 100644 --- a/src/NPCManager.hpp +++ b/src/NPCManager.hpp @@ -1,14 +1,15 @@ #pragma once #include "core/Core.hpp" -#include "PlayerManager.hpp" -#include "Transport.hpp" - #include "JSON.hpp" +#include "Transport.hpp" +#include "Chunking.hpp" + #include #include #include +#include #define RESURRECT_HEIGHT 400 @@ -28,8 +29,6 @@ struct NPCEvent { : npcType(t), trigger(tr), handler(hndlr) {} }; -struct WarpLocation; - namespace NPCManager { extern std::unordered_map NPCs; extern std::map Warps; diff --git a/src/Nanos.cpp b/src/Nanos.cpp index 34e200d..088d9cb 100644 --- a/src/Nanos.cpp +++ b/src/Nanos.cpp @@ -1,11 +1,11 @@ -#include "servers/CNShardServer.hpp" #include "Nanos.hpp" + +#include "servers/CNShardServer.hpp" + #include "PlayerManager.hpp" -#include "NPCManager.hpp" -#include "Combat.hpp" #include "Missions.hpp" -#include "Groups.hpp" #include "Abilities.hpp" +#include "NPCManager.hpp" #include diff --git a/src/Nanos.hpp b/src/Nanos.hpp index c41318e..2002330 100644 --- a/src/Nanos.hpp +++ b/src/Nanos.hpp @@ -1,10 +1,10 @@ #pragma once -#include -#include +#include "core/Core.hpp" #include "Player.hpp" -#include "servers/CNShardServer.hpp" + +#include struct NanoData { int style; diff --git a/src/Player.hpp b/src/Player.hpp index 477f1a7..7046d25 100644 --- a/src/Player.hpp +++ b/src/Player.hpp @@ -1,13 +1,12 @@ #pragma once -#include -#include - #include "core/Core.hpp" -#include "Chunking.hpp" + #include "Entities.hpp" #include "Groups.hpp" +#include + #define ACTIVE_MISSION_COUNT 6 #define PC_MAXHEALTH(level) (925 + 75 * (level)) diff --git a/src/PlayerManager.cpp b/src/PlayerManager.cpp index 1cff647..0de4087 100644 --- a/src/PlayerManager.cpp +++ b/src/PlayerManager.cpp @@ -1,25 +1,20 @@ -#include "core/Core.hpp" +#include "PlayerManager.hpp" + +#include "db/Database.hpp" #include "core/CNShared.hpp" #include "servers/CNShardServer.hpp" -#include "db/Database.hpp" -#include "PlayerManager.hpp" + #include "NPCManager.hpp" -#include "Missions.hpp" -#include "Items.hpp" -#include "Nanos.hpp" -#include "Groups.hpp" -#include "Chat.hpp" -#include "Buddies.hpp" #include "Combat.hpp" #include "Racing.hpp" -#include "BuiltinCommands.hpp" -#include "Abilities.hpp" #include "Eggs.hpp" - -#include "settings.hpp" +#include "Missions.hpp" +#include "Chat.hpp" +#include "Items.hpp" +#include "Buddies.hpp" +#include "BuiltinCommands.hpp" #include - #include #include #include diff --git a/src/PlayerManager.hpp b/src/PlayerManager.hpp index 883cf74..1e15ddc 100644 --- a/src/PlayerManager.hpp +++ b/src/PlayerManager.hpp @@ -1,16 +1,15 @@ #pragma once -#include "Player.hpp" #include "core/Core.hpp" -#include "servers/CNShardServer.hpp" -#include "Chunking.hpp" -#include +#include "Player.hpp" +#include "Chunking.hpp" +#include "Transport.hpp" +#include "Entities.hpp" + #include #include -struct WarpLocation; - namespace PlayerManager { extern std::map players; void init(); diff --git a/src/PlayerMovement.cpp b/src/PlayerMovement.cpp index b00f15b..c4d5150 100644 --- a/src/PlayerMovement.cpp +++ b/src/PlayerMovement.cpp @@ -1,4 +1,7 @@ #include "PlayerMovement.hpp" + +#include "servers/CNShardServer.hpp" + #include "PlayerManager.hpp" #include "TableData.hpp" #include "core/Core.hpp" diff --git a/src/Racing.cpp b/src/Racing.cpp index 565850c..c3b7f6f 100644 --- a/src/Racing.cpp +++ b/src/Racing.cpp @@ -1,10 +1,12 @@ -#include "servers/CNShardServer.hpp" #include "Racing.hpp" + +#include "db/Database.hpp" +#include "servers/CNShardServer.hpp" + +#include "NPCManager.hpp" #include "PlayerManager.hpp" #include "Missions.hpp" #include "Items.hpp" -#include "db/Database.hpp" -#include "NPCManager.hpp" using namespace Racing; diff --git a/src/Racing.hpp b/src/Racing.hpp index f6e6acb..a4f3b6d 100644 --- a/src/Racing.hpp +++ b/src/Racing.hpp @@ -1,8 +1,10 @@ #pragma once -#include +#include "core/Core.hpp" -#include "servers/CNShardServer.hpp" +#include +#include +#include struct EPInfo { int zoneX, zoneY, EPID, maxScore, maxTime; diff --git a/src/Rand.hpp b/src/Rand.hpp index 8f93053..2a73937 100644 --- a/src/Rand.hpp +++ b/src/Rand.hpp @@ -2,6 +2,7 @@ #include #include +#include namespace Rand { extern std::unique_ptr generator; diff --git a/src/TableData.cpp b/src/TableData.cpp index e9e9e21..94b8521 100644 --- a/src/TableData.cpp +++ b/src/TableData.cpp @@ -1,18 +1,14 @@ #include "TableData.hpp" + #include "NPCManager.hpp" -#include "Transport.hpp" -#include "Items.hpp" -#include "settings.hpp" #include "Missions.hpp" -#include "Chunking.hpp" -#include "Nanos.hpp" -#include "Racing.hpp" +#include "Items.hpp" #include "Vendors.hpp" +#include "Racing.hpp" +#include "Nanos.hpp" #include "Abilities.hpp" #include "Eggs.hpp" -#include "JSON.hpp" - #include #include #include diff --git a/src/TableData.hpp b/src/TableData.hpp index d8be3fc..5f54071 100644 --- a/src/TableData.hpp +++ b/src/TableData.hpp @@ -1,8 +1,13 @@ #pragma once -#include +#include "JSON.hpp" -#include "NPCManager.hpp" +#include "Entities.hpp" +#include "Transport.hpp" + +#include +#include +#include // these are added to the NPC's static key to avoid collisions const int NPC_ID_OFFSET = 1; diff --git a/src/Trading.cpp b/src/Trading.cpp index a46abfd..b9614d8 100644 --- a/src/Trading.cpp +++ b/src/Trading.cpp @@ -1,4 +1,7 @@ #include "Trading.hpp" + +#include "servers/CNShardServer.hpp" + #include "PlayerManager.hpp" using namespace Trading; diff --git a/src/Trading.hpp b/src/Trading.hpp index 108eefb..d7a0398 100644 --- a/src/Trading.hpp +++ b/src/Trading.hpp @@ -1,7 +1,5 @@ #pragma once -#include "Items.hpp" - namespace Trading { void init(); } \ No newline at end of file diff --git a/src/Transport.cpp b/src/Transport.cpp index 0374e00..0c43d9c 100644 --- a/src/Transport.cpp +++ b/src/Transport.cpp @@ -1,9 +1,12 @@ +#include "Transport.hpp" + #include "servers/CNShardServer.hpp" + #include "PlayerManager.hpp" #include "Nanos.hpp" -#include "Transport.hpp" #include "TableData.hpp" -#include "Combat.hpp" +#include "Entities.hpp" +#include "NPCManager.hpp" #include "MobAI.hpp" #include diff --git a/src/Transport.hpp b/src/Transport.hpp index 1efe304..fbacb60 100644 --- a/src/Transport.hpp +++ b/src/Transport.hpp @@ -1,8 +1,11 @@ #pragma once -#include "servers/CNShardServer.hpp" +#include "core/Core.hpp" #include +#include +#include +#include const int SLIDER_SPEED = 1200; const int SLIDER_STOP_TICKS = 16; diff --git a/src/Vendors.cpp b/src/Vendors.cpp index 6ec6603..d38625c 100644 --- a/src/Vendors.cpp +++ b/src/Vendors.cpp @@ -1,4 +1,9 @@ #include "Vendors.hpp" + +#include "servers/CNShardServer.hpp" + +#include "PlayerManager.hpp" +#include "Items.hpp" #include "Rand.hpp" using namespace Vendors; diff --git a/src/Vendors.hpp b/src/Vendors.hpp index 851791a..8df4c0f 100644 --- a/src/Vendors.hpp +++ b/src/Vendors.hpp @@ -1,10 +1,9 @@ #pragma once #include "core/Core.hpp" -#include "servers/CNShardServer.hpp" -#include "Items.hpp" -#include "PlayerManager.hpp" +#include +#include struct VendorListing { int sort, type, id; diff --git a/src/core/CNStructs.hpp b/src/core/CNStructs.hpp index fbadff2..290f8ca 100644 --- a/src/core/CNStructs.hpp +++ b/src/core/CNStructs.hpp @@ -23,6 +23,7 @@ #include #include #include +#include // yes this is ugly, but this is needed to zero out the memory so we don't have random stackdata in our structs. #define INITSTRUCT(T, x) T x; \ diff --git a/src/servers/CNLoginServer.cpp b/src/servers/CNLoginServer.cpp index fd152f3..fd6da95 100644 --- a/src/servers/CNLoginServer.cpp +++ b/src/servers/CNLoginServer.cpp @@ -1,13 +1,15 @@ #include "servers/CNLoginServer.hpp" + #include "core/CNShared.hpp" #include "db/Database.hpp" -#include "PlayerManager.hpp" -#include "Items.hpp" -#include #include "bcrypt/BCrypt.hpp" +#include "PlayerManager.hpp" +#include "Items.hpp" #include "settings.hpp" +#include + std::map CNLoginServer::loginSessions; CNLoginServer::CNLoginServer(uint16_t p) { diff --git a/src/servers/CNLoginServer.hpp b/src/servers/CNLoginServer.hpp index 6547b44..9b13829 100644 --- a/src/servers/CNLoginServer.hpp +++ b/src/servers/CNLoginServer.hpp @@ -1,6 +1,7 @@ #pragma once #include "core/Core.hpp" + #include "Player.hpp" #include diff --git a/src/servers/CNShardServer.cpp b/src/servers/CNShardServer.cpp index 036df15..51a0ee5 100644 --- a/src/servers/CNShardServer.cpp +++ b/src/servers/CNShardServer.cpp @@ -1,10 +1,12 @@ +#include "servers/CNShardServer.hpp" + #include "core/Core.hpp" +#include "core/CNShared.hpp" #include "db/Database.hpp" #include "servers/Monitor.hpp" -#include "servers/CNShardServer.hpp" + #include "PlayerManager.hpp" #include "MobAI.hpp" -#include "core/CNShared.hpp" #include "settings.hpp" #include "TableData.hpp" // for flush() diff --git a/src/servers/CNShardServer.hpp b/src/servers/CNShardServer.hpp index a16f38a..460d2a8 100644 --- a/src/servers/CNShardServer.hpp +++ b/src/servers/CNShardServer.hpp @@ -3,6 +3,7 @@ #include "core/Core.hpp" #include +#include #define REGISTER_SHARD_PACKET(pactype, handlr) CNShardServer::ShardPackets[pactype] = handlr; #define REGISTER_SHARD_TIMER(handlr, delta) CNShardServer::Timers.push_back(TimerEvent(handlr, delta)); diff --git a/src/servers/Monitor.cpp b/src/servers/Monitor.cpp index 4b7819f..5a28719 100644 --- a/src/servers/Monitor.cpp +++ b/src/servers/Monitor.cpp @@ -1,8 +1,10 @@ +#include "servers/Monitor.hpp" + #include "servers/CNShardServer.hpp" + #include "PlayerManager.hpp" #include "Chat.hpp" #include "Email.hpp" -#include "servers/Monitor.hpp" #include "settings.hpp" #include diff --git a/src/servers/Monitor.hpp b/src/servers/Monitor.hpp index dd40877..3edcf73 100644 --- a/src/servers/Monitor.hpp +++ b/src/servers/Monitor.hpp @@ -2,9 +2,6 @@ #include "core/Core.hpp" -#include -#include - namespace Monitor { SOCKET init(); bool acceptConnection(SOCKET, uint16_t); diff --git a/src/settings.cpp b/src/settings.cpp index 3413bea..85d3043 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -1,9 +1,10 @@ -#include + #include "settings.hpp" + +#include "core/CNStructs.hpp" // so we get the ACADEMY definition #include "INIReader.hpp" -// so we get the ACADEMY definition -#include "core/CNStructs.hpp" +#include // defaults :) int settings::VERBOSITY = 1; diff --git a/src/settings.hpp b/src/settings.hpp index e5295c7..878566a 100644 --- a/src/settings.hpp +++ b/src/settings.hpp @@ -1,5 +1,7 @@ #pragma once +#include + namespace settings { extern int VERBOSITY; extern bool SANDBOX; diff --git a/vendor/JSON.hpp b/vendor/JSON.hpp index 242f034..1866ad4 100644 --- a/vendor/JSON.hpp +++ b/vendor/JSON.hpp @@ -27,6 +27,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +#pragma once + #ifndef INCLUDE_NLOHMANN_JSON_HPP_ #define INCLUDE_NLOHMANN_JSON_HPP_