Major refactoring - internal server state machine implemented
This commit is contained in:
1 parent
71c654e5b6
commit
66e93d46f4
48 files changed
+3948
-3696
No files matched your search
+12
-5
@@ -2,10 +2,18 @@
|
||||
#include "external/nlohmann/json.hpp"
|
||||
#include "ISaveable.h"
|
||||
#include "NpcCar.h"
|
||||
#include "navigation/PathFinder.h"
|
||||
#include <string>
|
||||
|
||||
namespace FRG {
|
||||
|
||||
struct LocationState : public ISaveable {
|
||||
//This value is populated from the JSON configs and should not be changed during the regular gameplay.
|
||||
//It might be changed only in the editor mode during development.
|
||||
std::vector<PathFinder> navigationMaps;
|
||||
std::vector<Eigen::Vector3f> planPathExceptMyself(const Eigen::Vector3f& start, const Eigen::Vector3f& end, const std::string& entityId) const;
|
||||
void initNavigation(const std::vector<std::string>& paths);
|
||||
|
||||
// ---- Camera ----
|
||||
float cameraAzimuth = -2.35f;
|
||||
float cameraInclination = 1.1036f;
|
||||
@@ -13,11 +21,10 @@ struct LocationState : public ISaveable {
|
||||
// ---- Navigation ----
|
||||
int activeNavigationIndex = 0;
|
||||
|
||||
// ---- Walk-to targets (-1 = none) ----
|
||||
// Mirrors CharacterState's kNoTarget convention; raw pointers are not serialisable.
|
||||
int targetInteractiveObjectIndex = -1;
|
||||
int targetInteractNpcIndex = -1;
|
||||
int targetTeleportZoneIndex = -1;
|
||||
// ---- Walk-to targets (empty = none) ----
|
||||
std::string targetInteractiveObjectId;
|
||||
std::string targetInteractNpcId;
|
||||
std::string targetTeleportZoneId;
|
||||
|
||||
// ---- World-mode flags (synced from Game after each transition) ----
|
||||
bool isDarklands = false;
|
||||
|
||||
Reference in new issue
Block a user