Major refactoring - internal server state machine implemented

This commit is contained in:
Vladislav Khorev committed 2026-10-29 00:09:16 +06:00
1 parent 71c654e5b6
commit 66e93d46f4
48 files changed
+3948 -3696

No files matched your search

+7 -1
View File
@@ -11,6 +11,7 @@
#include "../CharacterState.h"
namespace FRG {
class IGameServer;
class Character;
@@ -41,6 +42,7 @@ namespace FRG {
};
struct InteractiveObjectData {
std::string id;
GameObjectData base;
float interactionRadius = 2.0f;
float approachRadius = 2.0f;
@@ -105,13 +107,17 @@ namespace FRG {
static std::vector<InteractiveObject> loadAndCreateInteractiveObjects(
const std::string& jsonPath,
Renderer& renderer,
std::unordered_map<std::string, std::shared_ptr<InteractiveObjectState>>& states,
const std::string& zipPath = ""
);
static std::vector<std::unique_ptr<FRG::Character>> loadAndCreate_Npcs(
const std::string& jsonPath,
Renderer& renderer,
const std::string& zipPath = ""
std::unordered_map<std::string, std::shared_ptr<CharacterState>>& states,
IGameServer& server,
const std::string& locationId,
const std::string& zipPath
);
static std::vector<NpcData> loadNpcsFromJson(const std::string& jsonPath, const std::string& zipPath = "");