]> de.git.xonotic.org Git - xonotic/darkplaces.git/blob - world.h
fixed 'slow gravity' bug when cl_movement players are not replying to all server...
[xonotic/darkplaces.git] / world.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 // world.h
21
22 #ifndef WORLD_H
23 #define WORLD_H
24
25 #include "collision.h"
26
27 #define MOVE_NORMAL     0
28 #define MOVE_NOMONSTERS 1
29 #define MOVE_MISSILE    2
30 #define MOVE_WORLDONLY  3
31 #define MOVE_HITMODEL   4
32
33
34 // called after the world model has been loaded, before linking any entities
35 void SV_ClearWorld (void);
36
37 // call before removing an entity, and before trying to move one,
38 // so it doesn't clip against itself
39 void SV_UnlinkEdict (prvm_edict_t *ent);
40
41 // Needs to be called any time an entity changes origin, mins, maxs, or solid
42 // sets ent->v.absmin and ent->v.absmax
43 // if touchtriggers, calls prog functions for the intersected triggers
44 void SV_LinkEdict (prvm_edict_t *ent, qboolean touch_triggers);
45
46 // returns list of entities touching a box
47 int SV_EntitiesInBox(vec3_t mins, vec3_t maxs, int maxlist, prvm_edict_t **list);
48
49 // mins and maxs are relative
50 // if the entire move stays in a solid volume, trace.allsolid will be set
51
52 // if the starting point is in a solid, it will be allowed to move out
53 // to an open area
54
55 // nomonsters is used for line of sight or edge testing, where mosnters
56 // shouldn't be considered solid objects
57
58 // passedict is explicitly excluded from clipping checks (normally NULL)
59 trace_t SV_Move(const vec3_t start, const vec3_t mins, const vec3_t maxs, const vec3_t end, int type, prvm_edict_t *passedict);
60
61 #define SV_PointSuperContents(point) (SV_Move((point), vec3_origin, vec3_origin, (point), sv_gameplayfix_swiminbmodels.integer ? MOVE_NOMONSTERS : MOVE_WORLDONLY, NULL).startsupercontents)
62
63 #endif
64