Skip to content

Commit

Permalink
* EDIT: Remove GOAP From CAgentManager
Browse files Browse the repository at this point in the history
  • Loading branch information
BearIvan committed Sep 24, 2024
1 parent 470383a commit 2be28c8
Show file tree
Hide file tree
Showing 12 changed files with 11 additions and 468 deletions.
20 changes: 9 additions & 11 deletions src/xrGame/agent_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include "agent_location_manager.h"
#include "agent_member_manager.h"
#include "agent_memory_manager.h"
#include "agent_manager_planner.h"
#include "FRbmkAgentManagerPlanner.h"

CAgentManager::CAgentManager ()
{
Expand Down Expand Up @@ -45,14 +45,13 @@ void CAgentManager::init_scheduler ()

void CAgentManager::init_components ()
{
m_corpse = new CAgentCorpseManager (this);
m_enemy = new CAgentEnemyManager (this);
m_explosive = new CAgentExplosiveManager(this);
m_location = new CAgentLocationManager (this);
m_member = new CAgentMemberManager (this);
m_memory = new CAgentMemoryManager (this);
m_brain = new CAgentManagerPlanner ();
brain().setup (this);
m_corpse = new CAgentCorpseManager (this);
m_enemy = new CAgentEnemyManager (this);
m_explosive = new CAgentExplosiveManager (this);
m_location = new CAgentLocationManager (this);
m_member = new CAgentMemberManager (this);
m_memory = new CAgentMemoryManager (this);
m_brain = new FRbmkAgentManagerPlanner (this);
}

#ifdef USE_SCHEDULER_IN_AGENT_MANAGER
Expand Down Expand Up @@ -81,7 +80,6 @@ void CAgentManager::remove_links (CObject *object)
location().remove_links (object);
member().remove_links (object);
memory().remove_links (object);
brain().remove_links (object);
}

void CAgentManager::update_impl ()
Expand All @@ -94,7 +92,7 @@ void CAgentManager::update_impl ()
explosive().update ();
location().update ();
member().update ();
brain().update ();
m_brain->Update ();
}

#ifdef USE_SCHEDULER_IN_AGENT_MANAGER
Expand Down
5 changes: 2 additions & 3 deletions src/xrGame/agent_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class CAgentExplosiveManager;
class CAgentLocationManager;
class CAgentMemberManager;
class CAgentMemoryManager;
class CAgentManagerPlanner;
class FRbmkAgentManagerPlanner;

//#define USE_SCHEDULER_IN_AGENT_MANAGER

Expand All @@ -31,7 +31,7 @@ class CAgentManagerPlanner;
CAgentLocationManager *m_location;
CAgentMemberManager *m_member;
CAgentMemoryManager *m_memory;
CAgentManagerPlanner *m_brain;
FRbmkAgentManagerPlanner *m_brain;

#ifndef USE_SCHEDULER_IN_AGENT_MANAGER
private:
Expand Down Expand Up @@ -72,7 +72,6 @@ class CAgentManagerPlanner;
IC CAgentLocationManager &location () const;
IC CAgentMemberManager &member () const;
IC CAgentMemoryManager &memory () const;
IC CAgentManagerPlanner &brain () const;
};

#include "agent_manager_inline.h"
99 changes: 0 additions & 99 deletions src/xrGame/agent_manager_actions.cpp

This file was deleted.

69 changes: 0 additions & 69 deletions src/xrGame/agent_manager_actions.h

This file was deleted.

6 changes: 0 additions & 6 deletions src/xrGame/agent_manager_inline.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,3 @@ IC CAgentMemoryManager &CAgentManager::memory () const
VERIFY (m_memory);
return (*m_memory);
}

IC CAgentManagerPlanner &CAgentManager::brain () const
{
VERIFY (m_brain);
return (*m_brain);
}
73 changes: 0 additions & 73 deletions src/xrGame/agent_manager_planner.cpp

This file was deleted.

25 changes: 0 additions & 25 deletions src/xrGame/agent_manager_planner.h

This file was deleted.

Loading

0 comments on commit 2be28c8

Please sign in to comment.