forked from mirrors/0ad
5ef98758b2
This was SVN commit r5176.
48 lines
740 B
C++
48 lines
740 B
C++
#ifndef SIMSTATE_INCLUDED
|
|
#define SIMSTATE_INCLUDED
|
|
|
|
class CUnit;
|
|
class CEntity;
|
|
#include "maths/Vector3D.h"
|
|
|
|
class SimState
|
|
{
|
|
public:
|
|
class Entity
|
|
{
|
|
public:
|
|
static Entity Freeze(CUnit* unit);
|
|
CEntity* Thaw();
|
|
private:
|
|
CStrW templateName;
|
|
int unitID;
|
|
std::set<CStr> selections;
|
|
int playerID;
|
|
CVector3D position;
|
|
float angle;
|
|
};
|
|
|
|
class Nonentity
|
|
{
|
|
public:
|
|
static Nonentity Freeze(CUnit* unit);
|
|
CUnit* Thaw();
|
|
private:
|
|
CStrW actorName;
|
|
int unitID;
|
|
std::set<CStr> selections;
|
|
CVector3D position;
|
|
float angle;
|
|
};
|
|
|
|
static SimState* Freeze(bool onlyEntities);
|
|
void Thaw();
|
|
|
|
private:
|
|
bool onlyEntities;
|
|
std::vector<Entity> entities;
|
|
std::vector<Nonentity> nonentities;
|
|
};
|
|
|
|
#endif // SIMSTATE_INCLUDED
|