Nuclide
Software Development Kit for id Tech
NSSquadMonster.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2023 Vera Visions LLC.
3 *
4 * Permission to use, copy, modify, and distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
7 *
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER
13 * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
14 * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15*/
16
17#define NSSQUADMONSTER_MAXMEMBERS 5
18
20class
22{
23public:
24 void NSSquadMonster(void);
25
26#ifdef SERVER
27 /* overrides */
28 virtual void Spawned(void);
29 virtual void SpawnKey(string, string);
30 virtual void Save(float);
31 virtual void Restore(string, string);
32
34 virtual void HasBecomeSquadLeader(void);
36 virtual void HasJoinedSquad(void);
37
39 nonvirtual bool InSquad(void);
41 nonvirtual bool IsSquadLeader(void);
43 nonvirtual NSSquadMonster GetSquadLeader(void);
44
46 nonvirtual void FindSquadNearMe(float);
47
49 nonvirtual void AddToSquad(NSSquadMonster);
51 nonvirtual void RemoveFromSquad(NSSquadMonster);
53 nonvirtual NSSquadMonster GetNearestSquadMember(void);
55 nonvirtual NSSquadMonster GetFarthestSquadMember(void);
56#endif
57
58#ifdef SERVER
59private:
60 string m_strSquadLeaderBody;
61 bool m_bStartAsLeader;
62 bool m_inSquad;
63 NSSquadMonster m_eSquadLeader;
64
65 /* stored only in the squad leader's memory */
67#endif
68};
#define NSSQUADMONSTER_MAXMEMBERS
Definition: NSSquadMonster.h:17
This entity class represents non-player characters.
Definition: NSMonster.h:323
NSSquadMonster based NPCs are able to communicate strategies together.
Definition: NSSquadMonster.h:22