- qboolean allsolid; // if true, plane is not valid
- qboolean startsolid; // if true, the initial point was in a solid area
- qboolean inopen, inwater;
- float fraction; // time completed, 1.0 = didn't hit anything
- vec3_t endpos; // final position
- plane_t plane; // surface normal at impact
- edict_t *ent; // entity the surface is on
- // LordHavoc: added texture and lighting to traceline
- char *texturename;
- vec3_t light;
-} trace_t;
+ // for ODE physics engine
+ qboolean ode; // if true then ode is activated
+ void *ode_world;
+ void *ode_space;
+ void *ode_contactgroup;
+ // number of constraint solver iterations to use (for dWorldQuickStep)
+ int ode_iterations;
+ // actual step (server frametime / ode_iterations)
+ vec_t ode_step;
+ // time we need to simulate, for constantstep
+ vec_t ode_time;
+ // stats
+ int ode_numobjects; // total objects cound
+ int ode_activeovjects; // active objects count
+ // max velocity for a 1-unit radius object at current step to prevent
+ // missed collisions
+ vec_t ode_movelimit;
+}
+world_physics_t;
+
+struct prvm_prog_s;
+
+typedef struct world_s
+{
+ // convenient fields
+ char filename[MAX_QPATH];
+ vec3_t mins;
+ vec3_t maxs;
+ struct prvm_prog_s *prog;
+
+ int areagrid_stats_calls;
+ int areagrid_stats_nodechecks;
+ int areagrid_stats_entitychecks;
+
+ link_t areagrid[AREA_GRIDNODES];
+ link_t areagrid_outside;
+ vec3_t areagrid_bias;
+ vec3_t areagrid_scale;
+ vec3_t areagrid_mins;
+ vec3_t areagrid_maxs;
+ vec3_t areagrid_size;
+ int areagrid_marknumber;
+
+ // if the QC uses a physics engine, the data for it is here
+ world_physics_t physics;
+}
+world_t;