|
|
1.1 root 1: // world.h
2:
3: typedef struct
4: {
5: vec3_t normal;
6: float dist;
7: } plane_t;
8:
9: typedef struct
10: {
11: qboolean allsolid; // if true, plane is not valid
12: qboolean startsolid; // if true, the initial point was in a solid area
13: qboolean inopen, inwater;
14: float fraction; // time completed, 1.0 = didn't hit anything
15: vec3_t endpos; // final position
16: plane_t plane; // surface normal at impact
17: edict_t *ent; // entity the surface is on
18: } trace_t;
19:
20:
21: #define MOVE_NORMAL 0
22: #define MOVE_NOMONSTERS 1
23: #define MOVE_MISSILE 2
24:
25:
26: void SV_ClearWorld (void);
27: // called after the world model has been loaded, before linking any entities
28:
29: void SV_UnlinkEdict (edict_t *ent);
30: // call before removing an entity, and before trying to move one,
31: // so it doesn't clip against itself
32: // flags ent->v.modified
33:
34: void SV_LinkEdict (edict_t *ent, qboolean touch_triggers);
35: // Needs to be called any time an entity changes origin, mins, maxs, or solid
36: // flags ent->v.modified
37: // sets ent->v.absmin and ent->v.absmax
38: // if touchtriggers, calls prog functions for the intersected triggers
39:
40: int SV_PointContents (vec3_t p);
1.1.1.2 ! root 41: int SV_TruePointContents (vec3_t p);
1.1 root 42: // returns the CONTENTS_* value from the world at the given point.
43: // does not check any entities at all
1.1.1.2 ! root 44: // the non-true version remaps the water current contents to content_water
1.1 root 45:
46: edict_t *SV_TestEntityPosition (edict_t *ent);
47:
48: trace_t SV_Move (vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end, int type, edict_t *passedict);
49: // mins and maxs are reletive
50:
51: // if the entire move stays in a solid volume, trace.allsolid will be set
52:
53: // if the starting point is in a solid, it will be allowed to move out
54: // to an open area
55:
56: // nomonsters is used for line of sight or edge testing, where mosnters
57: // shouldn't be considered solid objects
58:
59: // passedict is explicitly excluded from clipping checks (normally NULL)
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.