X-Git-Url: http://git.xonotic.org/?p=xonotic%2Fdarkplaces.git;a=blobdiff_plain;f=progs.h;h=fd8d109c3ee65fa1ddebba405e2c21e445f66264;hp=a528fa052704e5755d04dda55ca1bb63c506d702;hb=d7c6a4d737c8f59bab92b37e0039882aa88a6dc8;hpb=4faa30bc55ce8b30da01798c1d71019d5d74c8db diff --git a/progs.h b/progs.h index a528fa05..fd8d109c 100644 --- a/progs.h +++ b/progs.h @@ -25,27 +25,60 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define ENTITYGRIDAREAS 16 #define MAX_ENTITYCLUSTERS 16 -#define JOINTTYPE_POINT 1 -#define JOINTTYPE_HINGE 2 -#define JOINTTYPE_SLIDER 3 +#define GEOMTYPE_NONE -1 +#define GEOMTYPE_SOLID 0 +#define GEOMTYPE_BOX 1 +#define GEOMTYPE_SPHERE 2 +#define GEOMTYPE_CAPSULE 3 +#define GEOMTYPE_TRIMESH 4 +#define GEOMTYPE_CYLINDER 5 +#define GEOMTYPE_CAPSULE_X 6 +#define GEOMTYPE_CAPSULE_Y 7 +#define GEOMTYPE_CAPSULE_Z 8 +#define GEOMTYPE_CYLINDER_X 9 +#define GEOMTYPE_CYLINDER_Y 10 +#define GEOMTYPE_CYLINDER_Z 11 + +#define JOINTTYPE_NONE 0 +#define JOINTTYPE_POINT 1 +#define JOINTTYPE_HINGE 2 +#define JOINTTYPE_SLIDER 3 #define JOINTTYPE_UNIVERSAL 4 -#define JOINTTYPE_HINGE2 5 -#define JOINTTYPE_FIXED -1 +#define JOINTTYPE_HINGE2 5 +#define JOINTTYPE_FIXED -1 + +#define FORCETYPE_NONE 0 +#define FORCETYPE_FORCE 1 +#define FORCETYPE_FORCEATPOS 2 +#define FORCETYPE_TORQUE 3 + +#define ODEFUNC_ENABLE 1 +#define ODEFUNC_DISABLE 2 +#define ODEFUNC_FORCE 3 +#define ODEFUNC_TORQUE 4 + +typedef struct edict_odefunc_s +{ + int type; + vec3_t v1; + vec3_t v2; + struct edict_odefunc_s *next; +}edict_odefunc_t; typedef struct edict_engineprivate_s { // true if this edict is unused - qboolean free; + qbool free; // sv.time when the object was freed (to prevent early reuse which could // mess up client interpolation or obscure severe QuakeC bugs) - float freetime; + double freetime; // mark for the leak detector int mark; // place in the code where it was allocated (for the leak detector) const char *allocation_origin; // initially false to prevent projectiles from moving on their first frame // (even if they were spawned by an synchronous client think) - qboolean move; + qbool move; // cached cluster links for quick stationary object visibility checking vec3_t cullmins, cullmaxs; @@ -64,11 +97,11 @@ typedef struct edict_engineprivate_s // baseline values entity_state_t baseline; - // LordHavoc: gross hack to make floating items still work + // LadyHavoc: gross hack to make floating items still work int suspendedinairflag; // cached position to avoid redundant SV_CheckWaterTransition calls on monsters - qboolean waterposition_forceupdate; // force an update on this entity (set by SV_PushMove code for moving water entities) + qbool waterposition_forceupdate; // force an update on this entity (set by SV_PushMove code for moving water entities) vec3_t waterposition_origin; // updates whenever this changes // used by PushMove to keep track of where objects were before they were @@ -76,8 +109,12 @@ typedef struct edict_engineprivate_s vec3_t moved_from; vec3_t moved_fromangles; + framegroupblend_t framegroupblend[MAX_FRAMEGROUPBLENDS]; + frameblend_t frameblend[MAX_FRAMEBLENDS]; + skeleton_t skeleton; + // physics parameters - qboolean ode_physics; + qbool ode_physics; void *ode_body; void *ode_geom; void *ode_joint; @@ -85,14 +122,17 @@ typedef struct edict_engineprivate_s int *ode_element3i; int ode_numvertices; int ode_numtriangles; + edict_odefunc_t *ode_func; vec3_t ode_mins; vec3_t ode_maxs; + vec3_t ode_scale; vec_t ode_mass; + float ode_friction; vec3_t ode_origin; vec3_t ode_velocity; vec3_t ode_angles; vec3_t ode_avelocity; - qboolean ode_gravity; + qbool ode_gravity; int ode_modelindex; vec_t ode_movelimit; // smallest component of (maxs[]-mins[]) matrix4x4_t ode_offsetmatrix; @@ -104,6 +144,7 @@ typedef struct edict_engineprivate_s vec3_t ode_joint_angles; // joint axis vec3_t ode_joint_velocity; // second joint axis vec3_t ode_joint_movedir; // parameters + void *ode_massbuf; } edict_engineprivate_t;