UFO: Alien Invasion
Loading...
Searching...
No Matches
srvedict.h
Go to the documentation of this file.
1
5
6
/*
7
All original material Copyright (C) 2002-2025 UFO: Alien Invasion.
8
9
Original file from Quake 2 v3.21: quake2-2.31/game/game.h
10
Copyright (C) 1997-2001 Id Software, Inc.
11
12
This program is free software; you can redistribute it and/or
13
modify it under the terms of the GNU General Public License
14
as published by the Free Software Foundation; either version 2
15
of the License, or (at your option) any later version.
16
17
This program is distributed in the hope that it will be useful,
18
but WITHOUT ANY WARRANTY; without even the implied warranty of
19
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
20
21
See the GNU General Public License for more details.
22
23
You should have received a copy of the GNU General Public License
24
along with this program; if not, write to the Free Software
25
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
26
27
*/
28
29
#pragma once
30
31
#include "
../shared/ufotypes.h
"
32
34
class
SrvEdict
{
35
public
:
36
bool
inuse
;
37
int
linkcount
;
39
40
int
number
;
41
42
vec3_t
origin
;
43
vec3_t
angles
;
44
pos3_t
pos
;
45
46
solid_t
solid
;
47
48
AABB
entBox
;
49
AABB
absBox
;
50
vec3_t
size
;
51
52
SrvEdict
*
_child
;
53
SrvEdict
*
_owner
;
54
int
modelindex
;
55
56
const
char
*
classname
;
57
58
inline
SrvEdict
*
child
() {
/* only needed for SV_LinkEdict */
59
return
_child
;
60
}
61
inline
SrvEdict
*
owner
()
const
{
/* only used in isParentship, which is only used in SV_ClipMoveToEntities, called only by SV_Trace */
62
return
_owner
;
63
}
64
inline
bool
isSameAs
(
const
SrvEdict
* other)
const
{
65
if
(!other)
66
return
false
;
67
return
number
== other->
number
;
68
}
69
inline
bool
isParentship
(
const
SrvEdict
* other)
const
{
70
if
(other) {
71
if
(other->
owner
() && other->
owner
()->
isSameAs
(
this
))
72
return
true
;
73
if
(this->
owner
() && this->
owner
()->
isSameAs
(other))
74
return
true
;
75
}
76
return
false
;
77
}
78
};
AABB
Definition
aabb.h:42
SrvEdict
Definition
srvedict.h:34
SrvEdict::_child
SrvEdict * _child
Definition
srvedict.h:52
SrvEdict::modelindex
int modelindex
Definition
srvedict.h:54
SrvEdict::angles
vec3_t angles
Definition
srvedict.h:43
SrvEdict::inuse
bool inuse
Definition
srvedict.h:36
SrvEdict::child
SrvEdict * child()
Definition
srvedict.h:58
SrvEdict::size
vec3_t size
Definition
srvedict.h:50
SrvEdict::pos
pos3_t pos
Definition
srvedict.h:44
SrvEdict::solid
solid_t solid
Definition
srvedict.h:46
SrvEdict::isParentship
bool isParentship(const SrvEdict *other) const
Definition
srvedict.h:69
SrvEdict::absBox
AABB absBox
Definition
srvedict.h:49
SrvEdict::_owner
SrvEdict * _owner
Definition
srvedict.h:53
SrvEdict::entBox
AABB entBox
Definition
srvedict.h:48
SrvEdict::classname
const char * classname
Definition
srvedict.h:56
SrvEdict::owner
SrvEdict * owner() const
Definition
srvedict.h:61
SrvEdict::isSameAs
bool isSameAs(const SrvEdict *other) const
Definition
srvedict.h:64
SrvEdict::number
int number
Definition
srvedict.h:40
SrvEdict::origin
vec3_t origin
Definition
srvedict.h:42
SrvEdict::linkcount
int linkcount
Definition
srvedict.h:37
solid_t
solid_t
edict->solid values
Definition
game.h:153
ufotypes.h
Cross-platform type definitions.
pos3_t
pos_t pos3_t[3]
Definition
ufotypes.h:58
vec3_t
vec_t vec3_t[3]
Definition
ufotypes.h:39
src
game
srvedict.h
Generated on __DATE__ __TIME__ for UFO: Alien Invasion by
1.16.1