OpenMoHAA
0.83.0
Loading...
Searching...
No Matches
mover.h
1
/*
2
===========================================================================
3
Copyright (C) 2025 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
// mover.h: DESCRIPTION:
24
// Base class for any object that needs to move to specific locations over a
25
// period of time. This class is kept separate from most entities to keep
26
// class size down for objects that don't need such behavior.
27
//
28
29
#pragma once
30
31
#include "g_local.h"
32
#include "entity.h"
33
#include "trigger.h"
34
35
class
Mover :
public
Trigger
36
{
37
private
:
38
Vector finaldest;
39
Vector angledest;
40
Event *endevent;
41
int
moveflags;
42
43
public
:
44
CLASS_PROTOTYPE(Mover);
45
46
Mover();
47
virtual
~Mover();
48
void
MoveDone(Event *ev);
49
void
MoveTo(Vector tdest, Vector angdest,
float
tspeed, Event& event);
50
void
LinearInterpolate(Vector tdest, Vector angdest,
float
time, Event& event);
51
void
Stop();
52
void
Archive(
Archiver
& arc)
override
;
53
};
54
55
inline
void
Mover::Archive(
Archiver
& arc)
56
{
57
Trigger::Archive(arc);
58
59
arc.ArchiveVector(&finaldest);
60
arc.ArchiveVector(&angledest);
61
arc.ArchiveEventPointer(&endevent);
62
arc.ArchiveInteger(&moveflags);
63
}
Archiver
Definition
archive.h:86
code
fgame
mover.h
Generated by
1.13.2