From baabaea1c7240fa7e734bb358501cc9bec21179d Mon Sep 17 00:00:00 2001 From: havoc Date: Wed, 26 Oct 2005 10:13:00 +0000 Subject: [PATCH] replaced CL_PointQ1Contents with longer calls to contents conversion and CL_PointSuperContents changed CL_PointSuperContents to a #define calling SV_Move directly as an optimization git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5772 d7cf8633-e32d-0410-b094-e92efae38249 --- pr_cmds.c | 2 +- svvm_cmds.c | 2 +- world.c | 10 ---------- world.h | 3 +-- 4 files changed, 3 insertions(+), 14 deletions(-) diff --git a/pr_cmds.c b/pr_cmds.c index 23edb617..cc5c4141 100644 --- a/pr_cmds.c +++ b/pr_cmds.c @@ -1547,7 +1547,7 @@ PF_pointcontents */ void PF_pointcontents (void) { - PRVM_G_FLOAT(OFS_RETURN) = SV_PointQ1Contents(PRVM_G_VECTOR(OFS_PARM0)); + PRVM_G_FLOAT(OFS_RETURN) = Mod_Q1BSP_NativeContentsFromSuperContents(NULL, SV_PointSuperContents(PRVM_G_VECTOR(OFS_PARM0))); } /* diff --git a/svvm_cmds.c b/svvm_cmds.c index 251ecc4f..2bb027e5 100644 --- a/svvm_cmds.c +++ b/svvm_cmds.c @@ -903,7 +903,7 @@ PF_pointcontents */ void PF_pointcontents (void) { - PRVM_G_FLOAT(OFS_RETURN) = SV_PointQ1Contents(PRVM_G_VECTOR(OFS_PARM0)); + PRVM_G_FLOAT(OFS_RETURN) = Mod_Q1BSP_NativeContentsFromSuperContents(NULL, SV_PointSuperContents(PRVM_G_VECTOR(OFS_PARM0))); } /* diff --git a/world.c b/world.c index 7468e135..b367221d 100644 --- a/world.c +++ b/world.c @@ -739,14 +739,4 @@ trace_t SV_Move(const vec3_t start, const vec3_t mins, const vec3_t maxs, const } #endif -int SV_PointSuperContents(const vec3_t point) -{ - return SV_Move(point, vec3_origin, vec3_origin, point, sv_gameplayfix_swiminbmodels.integer ? MOVE_NOMONSTERS : MOVE_WORLDONLY, NULL).startsupercontents; -} - -int SV_PointQ1Contents(const vec3_t point) -{ - return Mod_Q1BSP_NativeContentsFromSuperContents(NULL, SV_PointSuperContents(point)); -} - diff --git a/world.h b/world.h index 898926e8..fd79b93e 100644 --- a/world.h +++ b/world.h @@ -61,8 +61,7 @@ int SV_EntitiesInBox(vec3_t mins, vec3_t maxs, int maxlist, prvm_edict_t **list) // passedict is explicitly excluded from clipping checks (normally NULL) 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); -int SV_PointQ1Contents(const vec3_t point); -int SV_PointSuperContents(const vec3_t point); +#define SV_PointSuperContents(point) (SV_Move((point), vec3_origin, vec3_origin, (point), sv_gameplayfix_swiminbmodels.integer ? MOVE_NOMONSTERS : MOVE_WORLDONLY, NULL).startsupercontents) #endif -- 2.39.2