1
0
forked from 0ad/0ad
0ad/source/tools/atlas/GameInterface/SimState.h
Ykkrosh 69404654bf Fixed #186 (problems with entity deletion in Atlas).
Maybe fixed errors from rare Atlas double-shutdown, but I don't know how
to reproduce the condition.

This was SVN commit r5162.
2007-06-10 19:00:25 +00:00

47 lines
719 B
C++

#ifndef SIMSTATE_INCLUDED
#define SIMSTATE_INCLUDED
class CUnit;
#include "maths/Vector3D.h"
class SimState
{
public:
class Entity
{
public:
static Entity Freeze(CUnit* unit);
void Thaw();
private:
CStrW templateName;
int unitID;
std::set<CStr> selections;
int playerID;
CVector3D position;
float angle;
};
class Nonentity
{
public:
static Nonentity Freeze(CUnit* unit);
void 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