OpenMoHAA 0.82.0
Loading...
Searching...
No Matches
object.h
1/*
2===========================================================================
3Copyright (C) 2008 the OpenMoHAA team
4
5This file is part of OpenMoHAA source code.
6
7OpenMoHAA source code is free software; you can redistribute it
8and/or modify it under the terms of the GNU General Public License as
9published by the Free Software Foundation; either version 2 of the License,
10or (at your option) any later version.
11
12OpenMoHAA source code is distributed in the hope that it will be
13useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15GNU General Public License for more details.
16
17You should have received a copy of the GNU General Public License
18along with OpenMoHAA source code; if not, write to the Free Software
19Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20===========================================================================
21*/
22
23// object.h: Object (used by common TIKIs)
24
25#pragma once
26
27#include "animate.h"
28
29class Object : public Animate
30{
31public:
32 CLASS_PROTOTYPE(Object);
33
34 void EventRemoveObjectModel(Event *ev);
35 void EventHandleSpawn(Event *ev);
36};
37
38class InteractObject : public Animate
39{
40private:
41 str m_sHitEffect;
42 str m_sKilledEffect;
43
44public:
45 CLASS_PROTOTYPE(InteractObject);
46
47 InteractObject();
48 void Damaged(Event *ev);
49 void Killed(Event *ev) override;
50 void Setup(Event *ev);
51 void EventHitEffect(Event *ev);
52 void EventKilledEffect(Event *ev);
53 void Archive(Archiver& arc) override;
54};
55
56extern Event EV_ThrowObject_Pickup;
57extern Event EV_ThrowObject_Throw;
58
59// Fixed in 2.0
60// Before 2.0, ThrowObject was inheriting from Object.
61// This caused issue when spawning the ThrowObject from script.
62class ThrowObject : public Animate
63{
64private:
65 int owner;
66 Vector pickup_offset;
67 str throw_sound;
68
69public:
70 CLASS_PROTOTYPE(ThrowObject);
71
72 ThrowObject();
73 void Touch(Event *ev);
74 void Throw(Event *ev);
75 void Pickup(Event *ev);
76 void PickupOffset(Event *ev);
77 void ThrowSound(Event *ev);
78 void Archive(Archiver& arc) override;
79};
80
81class HelmetObject : public Entity
82{
83public:
84 CLASS_PROTOTYPE(HelmetObject);
85
86 HelmetObject();
87 void HelmetTouch(Event *ev);
88};
Definition archive.h:86
Definition listener.h:246
Definition object.h:30
Definition vector.h:61
Definition str.h:77