Tiberian Technologies Scripts Reference Revision: 9000
Loading...
Searching...
No Matches
PhysObserverClass.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_PHYSOBSERVERCLASS_H
13#define TT_INCLUDE_PHYSOBSERVERCLASS_H
14class CollisionEventClass;
15class PhysClass;
16class PhysicalGameObj;
17class DamageableGameObj;
18class BuildingGameObj;
19enum _CollisionReactionType
20{
21 COLLISION_REACTION_DEFAULT,
22 COLLISION_REACTION_STOP_MOTION,
23 COLLISION_REACTION_NO_BOUNCE,
24};
25typedef int CollisionReactionType;
26enum _ExpirationReactionType
27{
28 EXPIRATION_DENIED,
29 EXPIRATION_APPROVED,
30};
31typedef int ExpirationReactionType;
32class PhysObserverClass
33{
34public:
35 virtual CollisionReactionType Collision_Occurred(const CollisionEventClass & event) { return COLLISION_REACTION_DEFAULT; }
36 virtual ExpirationReactionType Object_Expired(PhysClass * observed_obj) { return EXPIRATION_APPROVED; }
37 virtual void Object_Removed_From_Scene(PhysClass * observed_obj) { };
38 virtual void Object_Shattered_Something(PhysClass * observed_obj, PhysClass * shattered_obj, int surface_type) { };
39}; // 0004
40class CombatPhysObserverClass : public PhysObserverClass {
41public:
42 virtual DamageableGameObj * As_DamageableGameObj( void ) { return NULL; }
43 virtual PhysicalGameObj * As_PhysicalGameObj( void ) { return NULL; }
44 virtual BuildingGameObj * As_BuildingGameObj( void ) { return NULL; }
45}; // 0004
46
47#endif