qzdoom/src/g_shared/a_specialspot.h

46 lines
929 B
C
Raw Normal View History

2016-03-01 15:47:10 +00:00
#ifndef __A_SPECSPOT_H
#define __A_SPECSPOT_H
#include "actor.h"
#include "tarray.h"
class ASpecialSpot : public AActor
{
DECLARE_CLASS (ASpecialSpot, AActor)
public:
void BeginPlay();
void OnDestroy() override;
2016-03-01 15:47:10 +00:00
};
struct FSpotList;
class DSpotState : public DThinker
{
DECLARE_CLASS(DSpotState, DThinker)
static TObjPtr<DSpotState*> SpotState;
2016-09-19 17:58:04 +00:00
TArray<FSpotList> SpotLists;
2016-03-01 15:47:10 +00:00
public:
DSpotState ();
void OnDestroy() override;
2016-03-01 15:47:10 +00:00
void Tick ();
static DSpotState *GetSpotState(bool create = true);
2016-09-19 17:58:04 +00:00
FSpotList *FindSpotList(PClassActor *type);
2016-03-01 15:47:10 +00:00
bool AddSpot(ASpecialSpot *spot);
bool RemoveSpot(ASpecialSpot *spot);
2016-09-19 17:58:04 +00:00
void Serialize(FSerializer &arc);
ASpecialSpot *GetNextInList(PClassActor *type, int skipcounter);
ASpecialSpot *GetSpotWithMinMaxDistance(PClassActor *type, double x, double y, double mindist, double maxdist);
ASpecialSpot *GetRandomSpot(PClassActor *type, bool onlyonce = false);
2016-03-01 15:47:10 +00:00
};
#endif