diff --git a/src/planner.cpp b/src/planner.cpp index 26d3ab3..7bd7f1f 100644 --- a/src/planner.cpp +++ b/src/planner.cpp @@ -131,8 +131,6 @@ Vector> Planner::make_plan(Ref goal) { } Variant Planner::get_world_property(StringName prop_key) { - if(world_state_override.has(prop_key)) - return world_state_override.get(prop_key); if(prop_key.begins_with("g_")) return this->global_world_state->get_world_property(prop_key); if(this->cached_world_state.has(prop_key)) diff --git a/src/planner.hpp b/src/planner.hpp index ea3f4f7..01b93d5 100644 --- a/src/planner.hpp +++ b/src/planner.hpp @@ -58,13 +58,13 @@ public: void set_actions(Array actions); Array get_actions() const; -private: - CharacterActor *actor{nullptr}; - WorldState world_state_override{}; - WorldState cached_world_state{}; - GlobalWorldState *global_world_state{nullptr}; - Vector> actions{}; +private: + CharacterActor *actor{nullptr}; // the parent actor of this planner + WorldState cached_world_state{}; // the cached worldstate, cleared for every make_plan call + GlobalWorldState *global_world_state{nullptr}; // cached singleton instance + // configured settings + Vector> actions{}; // available actions }; struct PlannerNodeHasher {