OpenMoHAA
0.82.0
Loading...
Searching...
No Matches
object.h
1
/*
2
===========================================================================
3
Copyright (C) 2008 the OpenMoHAA team
4
5
This file is part of OpenMoHAA source code.
6
7
OpenMoHAA source code is free software; you can redistribute it
8
and/or modify it under the terms of the GNU General Public License as
9
published by the Free Software Foundation; either version 2 of the License,
10
or (at your option) any later version.
11
12
OpenMoHAA source code is distributed in the hope that it will be
13
useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
14
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
GNU General Public License for more details.
16
17
You should have received a copy of the GNU General Public License
18
along with OpenMoHAA source code; if not, write to the Free Software
19
Foundation, 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
29
class
Object
:
public
Animate
30
{
31
public
:
32
CLASS_PROTOTYPE(
Object
);
33
34
void
EventRemoveObjectModel(
Event
*ev);
35
void
EventHandleSpawn(
Event
*ev);
36
};
37
38
class
InteractObject :
public
Animate
39
{
40
private
:
41
str
m_sHitEffect;
42
str
m_sKilledEffect;
43
44
public
:
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
56
extern
Event
EV_ThrowObject_Pickup;
57
extern
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.
62
class
ThrowObject :
public
Animate
63
{
64
private
:
65
int
owner;
66
Vector
pickup_offset;
67
str
throw_sound;
68
69
public
:
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
81
class
HelmetObject :
public
Entity
82
{
83
public
:
84
CLASS_PROTOTYPE(HelmetObject);
85
86
HelmetObject();
87
void
HelmetTouch(
Event
*ev);
88
};
Archiver
Definition
archive.h:86
Event
Definition
listener.h:246
Object
Definition
object.h:30
Vector
Definition
vector.h:61
str
Definition
str.h:77
code
fgame
object.h
Generated by
1.13.2