OpenMoHAA ..
Loading...
Searching...
No Matches
playerstart.h
1/*
2===========================================================================
3Copyright (C) 2024 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// PlayerStart.h: Player start location entity declarations
24//
25
26#pragma once
27
28#include "g_local.h"
29#include "simpleentity.h"
30#include "camera.h"
31#include "navigate.h"
32
33class PlayerStart : public SimpleArchivedEntity
34{
35public:
36 bool m_bForbidSpawns;
37 bool m_bDeleteOnSpawn;
38
39public:
40 CLASS_PROTOTYPE(PlayerStart);
41
42 PlayerStart();
43
44 void Archive(Archiver& arc) override;
45
46 void SetAngle(Event *ev);
47 void EventEnableSpawn(Event *ev);
48 void EventDisableSpawn(Event *ev);
49 void EventDeleteOnSpawn(Event *ev);
50 void EventKeepOnSpawn(Event *ev);
51
52 // Added in OPM
53 static const char *GetDefaultTargetName();
54};
55
56inline void PlayerStart::Archive(Archiver& arc)
57{
58 SimpleArchivedEntity::Archive(arc);
59
60 arc.ArchiveBool(&m_bForbidSpawns);
61 arc.ArchiveBool(&m_bDeleteOnSpawn);
62}
63
64class TestPlayerStart : public PlayerStart
65{
66public:
67 CLASS_PROTOTYPE(TestPlayerStart);
68};
69
70class PlayerDeathmatchStart : public PlayerStart
71{
72public:
73 CLASS_PROTOTYPE(PlayerDeathmatchStart);
74};
75
77{
78public:
79 CLASS_PROTOTYPE(PlayerAlliedDeathmatchStart);
80};
81
83{
84public:
85 CLASS_PROTOTYPE(PlayerAxisDeathmatchStart);
86};
87
88class PlayerIntermission : public Camera
89{
90public:
91 CLASS_PROTOTYPE(PlayerIntermission);
92 PlayerIntermission();
93};
Definition archive.h:86
Definition playerstart.h:77
Definition playerstart.h:83
Definition playerstart.h:71
Definition playerstart.h:65