From a9ee5306884c5f84abb62bad3b9ed956d05bc68d Mon Sep 17 00:00:00 2001 From: Spoike Date: Wed, 15 Jan 2014 02:58:07 +0000 Subject: [PATCH] fix minimal builds. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4585 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/gl/gl_rmain.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/engine/gl/gl_rmain.c b/engine/gl/gl_rmain.c index adc5faa01..cc1ff1509 100644 --- a/engine/gl/gl_rmain.c +++ b/engine/gl/gl_rmain.c @@ -891,6 +891,7 @@ void GLR_DrawPortal(batch_t *batch, batch_t **blist, batch_t *depthmasklist[2], case 0: /*q3 portal*/ default: +#ifdef CSQC_DAT if (CSQC_SetupToRenderPortal(batch->ent->keynum)) { plane_t oplane = plane; @@ -908,17 +909,9 @@ void GLR_DrawPortal(batch_t *batch, batch_t **blist, batch_t *depthmasklist[2], if (Cvar_Get("temp_useplaneclip", "1", 0, "temp")->ival) portaltype = 1; //make sure the near clipplane is used. } - else if (batch->ent != &r_worldentity) - { - float d; - view = batch->ent; - d = DotProduct(r_refdef.vieworg, plane.normal) - plane.dist; - d-= 0.1; //nudge it past. - VectorAdd(r_refdef.vieworg, view->oldorigin, r_refdef.vieworg); //trivial offset for the warpzone. - VectorMA(r_refdef.vieworg, -d, plane.normal, r_refdef.pvsorigin); //clip the pvs origin to the plane. - Matrix4x4_CM_ModelViewMatrixFromAxis(vmat, vpn, vright, vup, r_refdef.vieworg); - } - else if (!(view = R_NearestPortal(&plane)) || VectorCompare(view->origin, view->oldorigin)) + else +#endif + if (!(view = R_NearestPortal(&plane)) || VectorCompare(view->origin, view->oldorigin)) { //a portal with no portal entity, or a portal rentity with an origin equal to its oldorigin, is a mirror. // r_refdef.flipcull ^= SHADER_CULL_FLIP;