1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-10 03:39:55 +00:00

Move AiTemporaryBase to a separate header

This commit is contained in:
elsid 2022-07-16 13:00:03 +02:00
parent e11fbc10b1
commit f5c2e09df9
No known key found for this signature in database
GPG Key ID: 4DE04C198CBA7625
5 changed files with 24 additions and 14 deletions

View File

@ -2,6 +2,7 @@
#define GAME_MWMECHANICS_AICOMBAT_H
#include "typedaipackage.hpp"
#include "aitemporarybase.hpp"
#include "../mwworld/cellstore.hpp" // for Doors

View File

@ -2,6 +2,7 @@
#define GAME_MWMECHANICS_AIFOLLOW_H
#include "typedaipackage.hpp"
#include "aitemporarybase.hpp"
#include <string>
#include <string_view>

View File

@ -1,6 +1,8 @@
#ifndef AISTATE_H
#define AISTATE_H
#include "aitemporarybase.hpp"
namespace MWMechanics
{
@ -70,19 +72,6 @@ namespace MWMechanics
}
};
/// \brief base class for the temporary storage of AiPackages.
/**
* Each AI package with temporary values needs a AiPackageStorage class
* which is derived from AiTemporaryBase. The Actor holds a container
* AiState where one of these storages can be stored at a time.
* The execute(...) member function takes this container as an argument.
* */
struct AiTemporaryBase
{
virtual ~AiTemporaryBase(){}
};
/// \brief Container for AI package status.
typedef DerivedClassStorage<AiTemporaryBase> AiState;
}

View File

@ -0,0 +1,19 @@
#ifndef OPENMW_MWMECHANICS_AISTATE_H
#define OPENMW_MWMECHANICS_AISTATE_H
namespace MWMechanics
{
/// \brief base class for the temporary storage of AiPackages.
/**
* Each AI package with temporary values needs a AiPackageStorage class
* which is derived from AiTemporaryBase. The Actor holds a container
* AiState where one of these storages can be stored at a time.
* The execute(...) member function takes this container as an argument.
* */
struct AiTemporaryBase
{
virtual ~AiTemporaryBase() = default;
};
}
#endif

View File

@ -7,7 +7,7 @@
#include "pathfinding.hpp"
#include "obstacle.hpp"
#include "aistate.hpp"
#include "aitemporarybase.hpp"
#include "aitimer.hpp"
namespace ESM