12#ifndef TT_INCLUDE_SCRIPTZONEGAMEOBJ_H
13#define TT_INCLUDE_SCRIPTZONEGAMEOBJ_H
15#include "ReferencerClass.h"
16#include "ScriptZoneGameObjDef.h"
17#include "ScriptableGameObj.h"
18#include "OBBoxClass.h"
21class ScriptZoneGameObj :
public ScriptableGameObj {
23 OBBoxClass BoundingBox;
25 SList<ReferencerClass> ZoneContents;
27 RenderObjClass* Model;
31 const PersistFactoryClass &Get_Factory()
const;
33 void Init(
const ScriptZoneGameObjDef &);
34 const ScriptZoneGameObjDef SCRIPTS_API & Get_Definition(
void )
const ;
35 bool Save(ChunkSaveClass &csave);
36 bool Load(ChunkLoadClass &cload);
39 bool In_List(PhysicalGameObj *);
40 bool Inside_Me(PhysicalGameObj *obj);
41 static ScriptZoneGameObj *Find_Closest_Zone(Vector3 &,ZoneConstants::ZoneType);
42 int Count_Team_Members_Inside(
int);
43 ScriptZoneGameObj * As_ScriptZoneGameObj() {
return this;}
44 void Get_Position(Vector3 *Position)
const {*Position = BoundingBox.Center;}
45 void Set_Bounding_Box(OBBoxClass &box) {BoundingBox = box;}
46 OBBoxClass &Get_Bounding_Box() {
return BoundingBox;}
47 int Get_Player_Type()
const {
return PlayerType;}
48 void Set_Player_Type(
int type) {PlayerType = type;}
49 bool Is_Environment_Zone() {
return Get_Definition().IsEnvironmentZone;}
50 virtual bool Point_In_Zone(
const Vector3 &v);