2 Copyright (C) 1996-1997 Id Software, Inc.
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.
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.
13 See the GNU General Public License for more details.
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.
30 // if true, the entire trace was in solid
32 // if true, the initial point was in solid
34 // if true, the trace passed through empty somewhere
36 // if true, the trace passed through water somewhere
38 // fraction of the total distance that was traveled before impact
39 // (1.0 = did not hit anything)
43 // surface normal at impact
45 // entity the surface is on
47 // if not zero, treats this value as empty, and all others as solid (impact
50 // the contents that was hit at the end or impact point
57 #define MOVE_NOMONSTERS 1
58 #define MOVE_MISSILE 2
61 void SV_ClearWorld (void);
62 // called after the world model has been loaded, before linking any entities
64 void SV_UnlinkEdict (edict_t *ent);
65 // call before removing an entity, and before trying to move one,
66 // so it doesn't clip against itself
67 // flags ent->v.modified
69 void SV_LinkEdict (edict_t *ent, qboolean touch_triggers);
70 // Needs to be called any time an entity changes origin, mins, maxs, or solid
71 // flags ent->v.modified
72 // sets ent->v.absmin and ent->v.absmax
73 // if touchtriggers, calls prog functions for the intersected triggers
75 extern int SV_HullPointContents (hull_t *hull, int num, vec3_t p);
76 // LordHavoc: waste of time to wrap it
77 //int SV_PointContents (vec3_t p);
78 #define SV_PointContents(testpoint) SV_HullPointContents(&sv.worldmodel->hulls[0], 0, (testpoint))
79 // returns the CONTENTS_* value from the world at the given point.
80 // does not check any entities at all
81 // the non-true version remaps the water current contents to content_water
83 edict_t *SV_TestEntityPosition (edict_t *ent);
85 trace_t SV_Move (vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end, int type, edict_t *passedict);
86 // mins and maxs are reletive
88 // if the entire move stays in a solid volume, trace.allsolid will be set
90 // if the starting point is in a solid, it will be allowed to move out
93 // nomonsters is used for line of sight or edge testing, where mosnters
94 // shouldn't be considered solid objects
96 // passedict is explicitly excluded from clipping checks (normally NULL)
98 int SV_RecursiveHullCheck (int num, double p1f, double p2f, double p1[3], double p2[3]);
107 RecursiveHullCheckTraceInfo_t;
109 // LordHavoc: FIXME: this is not thread safe, if threading matters here, pass
110 // this as a struct to RecursiveHullCheck, RecursiveHullCheck_Impact, etc...
111 extern RecursiveHullCheckTraceInfo_t RecursiveHullCheckInfo;