Skip to content

Commit b717f19

Browse files
committed
Added basic NavMesh Path Visualization
Added Basic NetField support Added new command ("cheat path generate") Fixed ChunkID calculations Fixed a crash when trying to initialize Spell.cdb Added premake project lua files to solutions Updated to new MetaGen System Updated Submodule Engine
1 parent 6fad466 commit b717f19

File tree

68 files changed

+1234
-991
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+1234
-991
lines changed

Source/Game-App/Game-App.lua

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,11 @@ Solution.Util.CreateConsoleApp(mod.Name, Solution.Projects.Current.BinDir, mod.D
55

66
Solution.Util.SetLanguage("C++")
77
Solution.Util.SetCppDialect(20)
8-
8+
9+
local projFile = mod.Path .. "/" .. mod.Name .. ".lua"
910
local files = Solution.Util.GetFilesForCpp(mod.Path)
11+
table.insert(files, projFile)
12+
1013
Solution.Util.SetFiles(files)
1114
Solution.Util.SetIncludes(mod.Path)
1215
Solution.Util.SetDefines(defines)
@@ -22,7 +25,7 @@ Solution.Util.CreateConsoleApp(mod.Name, Solution.Projects.Current.BinDir, mod.D
2225
vpaths
2326
{
2427
['Resources/*'] = { '*.rc', '**.ico' },
25-
['*'] = { '**.*' }
28+
["/*"] = { "*.lua", mod.Name .. "/**" }
2629
}
2730
end)
2831
end)

Source/Game-Lib/Game-Lib.lua

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ Solution.Util.CreateStaticLib(mod.Name, Solution.Projects.Current.BinDir, mod.De
88
Solution.Util.SetLanguage("C++")
99
Solution.Util.SetCppDialect(20)
1010

11+
local projFile = mod.Path .. "/" .. mod.Name .. ".lua"
1112
local files = Solution.Util.GetFilesForCpp(mod.Path)
13+
table.insert(files, projFile)
14+
1215
Solution.Util.SetFiles(files)
1316
Solution.Util.SetIncludes(mod.Path)
1417
Solution.Util.SetDefines(defines)
@@ -19,6 +22,10 @@ Solution.Util.CreateStaticLib(mod.Name, Solution.Projects.Current.BinDir, mod.De
1922
else
2023
Solution.Util.SetDefines("SHADER_SOURCE_DIR=\"" .. shaderSourceDir .. "\"")
2124
end
25+
26+
vpaths {
27+
["/*"] = { "*.lua", mod.Name .. "/**" }
28+
}
2229
end)
2330

2431
Solution.Util.CreateDep(mod.NameLow, mod.Dependencies, function()

Source/Game-Lib/Game-Lib/Application/Application.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
#include <Base/Util/DebugHandler.h>
4040
#include <Base/Util/CPUInfo.h>
4141

42-
#include <Meta/Generated/Game/LuaEnum.h>
42+
#include <MetaGen/Game/Lua/Lua.h>
4343

4444
#include <Network/Client.h>
4545

@@ -343,13 +343,13 @@ bool Application::Init()
343343
_luaManager = new Scripting::LuaManager();
344344
ServiceLocator::SetLuaManager(_luaManager);
345345

346-
_luaManager->PrepareToAddLuaHandlers((Scripting::LuaHandlerID)Generated::LuaHandlerTypeEnum::Count);
347-
_luaManager->SetLuaHandler((Scripting::LuaHandlerID)Generated::LuaHandlerTypeEnum::Global, new Scripting::GlobalHandler());
348-
_luaManager->SetLuaHandler((Scripting::LuaHandlerID)Generated::LuaHandlerTypeEnum::Event, new Scripting::EventHandler());
349-
_luaManager->SetLuaHandler((Scripting::LuaHandlerID)Generated::LuaHandlerTypeEnum::Database, new Scripting::Database::DatabaseHandler());
350-
_luaManager->SetLuaHandler((Scripting::LuaHandlerID)Generated::LuaHandlerTypeEnum::UI, new Scripting::UI::UIHandler());
351-
_luaManager->SetLuaHandler((Scripting::LuaHandlerID)Generated::LuaHandlerTypeEnum::Game, new Scripting::Game::GameHandler());
352-
_luaManager->SetLuaHandler((Scripting::LuaHandlerID)Generated::LuaHandlerTypeEnum::Unit, new Scripting::Unit::UnitHandler());
346+
_luaManager->PrepareToAddLuaHandlers((Scripting::LuaHandlerID)MetaGen::Game::Lua::LuaHandlerTypeEnum::Count);
347+
_luaManager->SetLuaHandler((Scripting::LuaHandlerID)MetaGen::Game::Lua::LuaHandlerTypeEnum::Global, new Scripting::GlobalHandler());
348+
_luaManager->SetLuaHandler((Scripting::LuaHandlerID)MetaGen::Game::Lua::LuaHandlerTypeEnum::Event, new Scripting::EventHandler());
349+
_luaManager->SetLuaHandler((Scripting::LuaHandlerID)MetaGen::Game::Lua::LuaHandlerTypeEnum::Database, new Scripting::Database::DatabaseHandler());
350+
_luaManager->SetLuaHandler((Scripting::LuaHandlerID)MetaGen::Game::Lua::LuaHandlerTypeEnum::UI, new Scripting::UI::UIHandler());
351+
_luaManager->SetLuaHandler((Scripting::LuaHandlerID)MetaGen::Game::Lua::LuaHandlerTypeEnum::Game, new Scripting::Game::GameHandler());
352+
_luaManager->SetLuaHandler((Scripting::LuaHandlerID)MetaGen::Game::Lua::LuaHandlerTypeEnum::Unit, new Scripting::Unit::UnitHandler());
353353

354354
auto globalKey = Scripting::ZenithInfoKey::MakeGlobal(0, 0);
355355
_luaManager->GetZenithStateManager().Add(globalKey);

Source/Game-Lib/Game-Lib/ECS/Components/ProximityTrigger.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#pragma once
22
#include <Base/Types.h>
33

4-
#include <Meta/Generated/Shared/ProximityTriggerEnum.h>
4+
#include <MetaGen/Shared/ProximityTrigger/ProximityTrigger.h>
55

66
#include <entt/entt.hpp>
77
#include <set>
@@ -13,7 +13,7 @@ namespace ECS::Components
1313
static const u32 INVALID_NETWORK_ID = std::numeric_limits<u32>().max();
1414

1515
u32 networkID = INVALID_NETWORK_ID;
16-
Generated::ProximityTriggerFlagEnum flags = Generated::ProximityTriggerFlagEnum::None;
16+
MetaGen::Shared::ProximityTrigger::ProximityTriggerFlagEnum flags = MetaGen::Shared::ProximityTrigger::ProximityTriggerFlagEnum::None;
1717
std::set<entt::entity> playersInside; // Entities currently inside the trigger
1818
};
1919
}

Source/Game-Lib/Game-Lib/ECS/Components/UnitEquipment.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
#include <Base/Types.h>
55

6-
#include <Meta/Generated/Shared/UnitEnum.h>
6+
#include <MetaGen/Shared/Unit/Unit.h>
77

88
#include <entt/fwd.hpp>
99

@@ -16,11 +16,11 @@ namespace ECS
1616
struct UnitEquipment
1717
{
1818
public:
19-
std::array<u32, (u32)Generated::ItemEquipSlotEnum::EquipmentEnd + 1u> equipmentSlotToItemID;
20-
robin_hood::unordered_set<Generated::ItemEquipSlotEnum> dirtyItemIDSlots;
19+
std::array<u32, (u32)MetaGen::Shared::Unit::ItemEquipSlotEnum::EquipmentEnd + 1u> equipmentSlotToItemID;
20+
robin_hood::unordered_set<MetaGen::Shared::Unit::ItemEquipSlotEnum> dirtyItemIDSlots;
2121

22-
std::array<u32, (u32)Generated::ItemEquipSlotEnum::EquipmentEnd + 1u> equipmentSlotToVisualItemID;
23-
robin_hood::unordered_set<Generated::ItemEquipSlotEnum> dirtyVisualItemIDSlots;
22+
std::array<u32, (u32)MetaGen::Shared::Unit::ItemEquipSlotEnum::EquipmentEnd + 1u> equipmentSlotToVisualItemID;
23+
robin_hood::unordered_set<MetaGen::Shared::Unit::ItemEquipSlotEnum> dirtyVisualItemIDSlots;
2424
};
2525

2626
struct UnitEquipmentDirty { };

Source/Game-Lib/Game-Lib/ECS/Components/UnitPowersComponent.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#pragma once
22
#include <Base/Types.h>
33

4-
#include <Meta/Generated/Shared/UnitEnum.h>
4+
#include <MetaGen/Shared/Unit/Unit.h>
55

66
#include <robinhood/robinhood.h>
77

@@ -20,8 +20,8 @@ namespace ECS
2020
struct UnitPowersComponent
2121
{
2222
public:
23-
robin_hood::unordered_map<Generated::PowerTypeEnum, UnitPower> powerTypeToValue;
24-
robin_hood::unordered_set<Generated::PowerTypeEnum> dirtyPowerTypes;
23+
robin_hood::unordered_map<MetaGen::Shared::Unit::PowerTypeEnum, UnitPower> powerTypeToValue;
24+
robin_hood::unordered_set<MetaGen::Shared::Unit::PowerTypeEnum> dirtyPowerTypes;
2525
};
2626
}
2727
}

Source/Game-Lib/Game-Lib/ECS/Components/UnitResistancesComponent.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#pragma once
22
#include <Base/Types.h>
33

4-
#include <Meta/Generated/Shared/UnitEnum.h>
4+
#include <MetaGen/Shared/Unit/Unit.h>
55

66
#include <robinhood/robinhood.h>
77

@@ -20,8 +20,8 @@ namespace ECS
2020
struct UnitResistancesComponent
2121
{
2222
public:
23-
robin_hood::unordered_map<Generated::ResistanceTypeEnum, UnitResistance> resistanceTypeToValue;
24-
robin_hood::unordered_set<Generated::ResistanceTypeEnum> dirtyResistanceTypes;
23+
robin_hood::unordered_map<MetaGen::Shared::Unit::ResistanceTypeEnum, UnitResistance> resistanceTypeToValue;
24+
robin_hood::unordered_set<MetaGen::Shared::Unit::ResistanceTypeEnum> dirtyResistanceTypes;
2525
};
2626
}
2727
}

Source/Game-Lib/Game-Lib/ECS/Components/UnitStatsComponent.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#pragma once
22
#include <Base/Types.h>
33

4-
#include <Meta/Generated/Shared/UnitEnum.h>
4+
#include <MetaGen/Shared/Unit/Unit.h>
55

66
#include <robinhood/robinhood.h>
77

@@ -19,8 +19,8 @@ namespace ECS
1919
struct UnitStatsComponent
2020
{
2121
public:
22-
robin_hood::unordered_map<Generated::StatTypeEnum, UnitStat> statTypeToValue;
23-
robin_hood::unordered_set<Generated::StatTypeEnum> dirtyStatTypes;
22+
robin_hood::unordered_map<MetaGen::Shared::Unit::StatTypeEnum, UnitStat> statTypeToValue;
23+
robin_hood::unordered_set<MetaGen::Shared::Unit::StatTypeEnum> dirtyStatTypes;
2424
};
2525
}
2626
}

Source/Game-Lib/Game-Lib/ECS/Singletons/Database/ClientDBSingleton.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ namespace ECS
7979
template <typename T> requires ClientDB::ValidClientDB<T>
8080
bool Register()
8181
{
82-
ClientDBHash hash = static_cast<ClientDBHash>(T::NameHash);
83-
if (!Register(hash, T::Name))
82+
ClientDBHash hash = static_cast<ClientDBHash>(T::NAME_HASH);
83+
if (!Register(hash, T::NAME))
8484
return false;
8585

8686
auto* storage = Get(hash);

Source/Game-Lib/Game-Lib/ECS/Singletons/NetworkState.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#pragma once
22
#include <Gameplay/GameDefine.h>
3+
#include <Gameplay/Network/Define.h>
34

45
#include <robinhood/robinhood.h>
56

@@ -123,6 +124,11 @@ namespace ECS
123124
CharacterListInfo characterListInfo;
124125
PingInfo pingInfo;
125126

127+
Network::ObjectNetFieldsListener objectNetFieldListener;
128+
Network::UnitNetFieldsListener unitNetFieldListener;
129+
130+
std::vector<vec3> pathToVisualize;
131+
126132
robin_hood::unordered_map<ObjectGUID, entt::entity> networkIDToEntity;
127133
robin_hood::unordered_map<entt::entity, ObjectGUID> entityToNetworkID;
128134
RTree<ObjectGUID, f32, 3>* networkVisTree = nullptr;

0 commit comments

Comments
 (0)