From: havoc Date: Wed, 26 Oct 2005 10:13:00 +0000 (+0000) Subject: replaced CL_PointQ1Contents with longer calls to contents conversion and CL_PointSupe... X-Git-Tag: xonotic-v0.1.0preview~4512 X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fdarkplaces.git;a=commitdiff_plain;h=baabaea1c7240fa7e734bb358501cc9bec21179d 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 --- 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