mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-10 21:40:15 +00:00
Move AiTemporaryBase to a separate header
This commit is contained in:
parent
e11fbc10b1
commit
f5c2e09df9
@ -2,6 +2,7 @@
|
|||||||
#define GAME_MWMECHANICS_AICOMBAT_H
|
#define GAME_MWMECHANICS_AICOMBAT_H
|
||||||
|
|
||||||
#include "typedaipackage.hpp"
|
#include "typedaipackage.hpp"
|
||||||
|
#include "aitemporarybase.hpp"
|
||||||
|
|
||||||
#include "../mwworld/cellstore.hpp" // for Doors
|
#include "../mwworld/cellstore.hpp" // for Doors
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
#define GAME_MWMECHANICS_AIFOLLOW_H
|
#define GAME_MWMECHANICS_AIFOLLOW_H
|
||||||
|
|
||||||
#include "typedaipackage.hpp"
|
#include "typedaipackage.hpp"
|
||||||
|
#include "aitemporarybase.hpp"
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <string_view>
|
#include <string_view>
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
#ifndef AISTATE_H
|
#ifndef AISTATE_H
|
||||||
#define AISTATE_H
|
#define AISTATE_H
|
||||||
|
|
||||||
|
#include "aitemporarybase.hpp"
|
||||||
|
|
||||||
namespace MWMechanics
|
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.
|
/// \brief Container for AI package status.
|
||||||
typedef DerivedClassStorage<AiTemporaryBase> AiState;
|
typedef DerivedClassStorage<AiTemporaryBase> AiState;
|
||||||
}
|
}
|
||||||
|
19
apps/openmw/mwmechanics/aitemporarybase.hpp
Normal file
19
apps/openmw/mwmechanics/aitemporarybase.hpp
Normal 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
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
#include "pathfinding.hpp"
|
#include "pathfinding.hpp"
|
||||||
#include "obstacle.hpp"
|
#include "obstacle.hpp"
|
||||||
#include "aistate.hpp"
|
#include "aitemporarybase.hpp"
|
||||||
#include "aitimer.hpp"
|
#include "aitimer.hpp"
|
||||||
|
|
||||||
namespace ESM
|
namespace ESM
|
||||||
|
Loading…
x
Reference in New Issue
Block a user