Tiberian Technologies Scripts Reference Revision: 9000
Loading...
Searching...
No Matches
ScriptZoneGameObj.h
1/* Renegade Scripts.dll
2 Copyright 2013 Tiberian Technologies
3
4 This file is part of the Renegade scripts.dll
5 The Renegade scripts.dll is free software; you can redistribute it and/or modify it under
6 the terms of the GNU General Public License as published by the Free
7 Software Foundation; either version 2, or (at your option) any later
8 version. See the file COPYING for more details.
9 In addition, an exemption is given to allow Run Time Dynamic Linking of this code with any closed source module that does not contain code covered by this licence.
10 Only the source code to the module(s) containing the licenced code has to be released.
11*/
12#ifndef TT_INCLUDE_SCRIPTZONEGAMEOBJ_H
13#define TT_INCLUDE_SCRIPTZONEGAMEOBJ_H
14#include "SList.h"
15#include "ReferencerClass.h"
16#include "ScriptZoneGameObjDef.h"
17#include "ScriptableGameObj.h"
18#include "OBBoxClass.h"
19class SmartGameObj;
20class RenderObjClass;
21class ScriptZoneGameObj : public ScriptableGameObj {
22private:
23 OBBoxClass BoundingBox;
24 int PlayerType;
25 SList<ReferencerClass> ZoneContents;
26
27 RenderObjClass* Model;
28public:
29 ScriptZoneGameObj();
30 ~ScriptZoneGameObj();
31 const PersistFactoryClass &Get_Factory() const;
32 void Init();
33 void Init(const ScriptZoneGameObjDef &);
34 const ScriptZoneGameObjDef SCRIPTS_API & Get_Definition( void ) const ;
35 bool Save(ChunkSaveClass &csave);
36 bool Load(ChunkLoadClass &cload);
37 void On_Post_Load();
38 void Think();
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);
51};
52
53#endif