]> icculus.org git repositories - divverent/darkplaces.git/blob - progs.h
Move a part of r_refdef_t into a new r_refdef_scene_t struct and refactor the code...
[divverent/darkplaces.git] / progs.h
1 /*
2 Copyright (C) 1996-1997 Id Software, Inc.
3
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU General Public License
6 as published by the Free Software Foundation; either version 2
7 of the License, or (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12
13 See the GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
18
19 */
20
21 #ifndef PROGS_H
22 #define PROGS_H
23 #include "pr_comp.h"                    // defs shared with qcc
24
25 #define ENTITYGRIDAREAS 16
26 #define MAX_ENTITYCLUSTERS 16
27
28 typedef struct edict_engineprivate_s
29 {
30         // true if this edict is unused
31         qboolean free;
32         // sv.time when the object was freed (to prevent early reuse which could
33         // mess up client interpolation or obscure severe QuakeC bugs)
34         float freetime;
35         // initially false to prevent projectiles from moving on their first frame
36         // (even if they were spawned by an synchronous client think)
37         qboolean move;
38
39         // cached cluster links for quick stationary object visibility checking
40         vec3_t cullmins, cullmaxs;
41         int pvs_numclusters;
42         int pvs_clusterlist[MAX_ENTITYCLUSTERS];
43
44         // physics grid areas this edict is linked into
45         link_t areagrid[ENTITYGRIDAREAS];
46         // since the areagrid can have multiple references to one entity,
47         // we should avoid extensive checking on entities already encountered
48         int areagridmarknumber;
49         // mins/maxs passed to World_LinkEdict
50         vec3_t areamins, areamaxs;
51
52         // PROTOCOL_QUAKE, PROTOCOL_QUAKEDP, PROTOCOL_NEHAHRAMOVIE, PROTOCOL_QUAKEWORLD
53         // baseline values
54         entity_state_t baseline;
55
56         // LordHavoc: gross hack to make floating items still work
57         int suspendedinairflag;
58
59         // cached position to avoid redundant SV_CheckWaterTransition calls on monsters
60         qboolean waterposition_forceupdate; // force an update on this entity (set by SV_PushMove code for moving water entities)
61         vec3_t waterposition_origin; // updates whenever this changes
62
63         // used by PushMove to keep track of where objects were before they were
64         // moved, in case they need to be moved back
65         vec3_t moved_from;
66         vec3_t moved_fromangles;
67 }
68 edict_engineprivate_t;
69
70 #endif