Tiberian Technologies Scripts Reference Revision: 9000
Loading...
Searching...
No Matches
C4GameObj.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_C4GAMEOBJ_H
13#define TT_INCLUDE_C4GAMEOBJ_H
14#include "SimpleGameObj.h"
15
16class PlayerDataClass;
17class C4GameObjDef;
18class AmmoDefinitionClass;
19
20class C4GameObj : public SimpleGameObj
21{
22private:
23 float TriggerTime; // 07B0
24 ReferencerClass Owner; // 07B4
25 PlayerDataClass *Player; // 07C4
26 const AmmoDefinitionClass* AmmoDef; // 07C8
27 int DetonationMode; // 07CC
28 bool attached; // 07D0
29 bool attachedToDynamic; // 07D1
30 ReferencerClass attachObject; // 07D4
31 Vector3 AttachLocation; // 07E4
32 int AttachBoneIndex; // 07F0
33 PhysClass* attachPhysics; // 07F4
34 bool IsAttachedToMCT; // 07F8
35 float SleepTime; // 07FC
36public:
37
38 const PersistFactoryClass &Get_Factory() const;
39 C4GameObj();
40 ~C4GameObj();
41 void Init();
42 void Init(const C4GameObjDef &);
43 SCRIPTS_API const C4GameObjDef & Get_Definition( void ) const ;
44 void Init_C4(AmmoDefinitionClass const *ammoPreset, SoldierGameObj* owner, uint32 detonationMode, const Matrix3D& muzzle);
45 CollisionReactionType Collision_Occurred(const CollisionEventClass& collide);
46 bool Save(ChunkSaveClass &csave);
47 bool Load(ChunkLoadClass &cload);
48 void Think();
49 void Post_Think();
50 void Detonate();
51 void Completely_Damaged(const OffenseObjectClass &offense);
52 void Get_Information(StringClass &str);
53 void Export_Rare(BitStreamClass &BitStream);
54 void Import_Rare(BitStreamClass &BitStream);
55 void Defuse();
56 void Restore_Owner();
57 static void Maintain_C4_Limit(int limit);
58 C4GameObj * As_C4GameObj() {return this;}
59 ScriptableGameObj * Get_Stuck_Object() {return attachObject;}
60 SoldierGameObj *Get_Owner() const {return (SoldierGameObj*)Owner.Get_Ptr();}
61 const AmmoDefinitionClass *Get_Ammo_Def() {return AmmoDef;}
62 PlayerDataClass *Get_Player_Data() {return Player;}
63};
64
65#endif