Browse files

Keep sideways checks in FVisibleEnemy disabled after all

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
  • Loading branch information...
1 parent 19910dd commit e00ec9e4e1953884d5d2270bf65a8dc0f4fbd231 @jkivilin committed Jan 30, 2013
Showing with 10 additions and 3 deletions.
  1. +1 −1 Makefile
  2. +9 −2 util.cpp
View
2 Makefile
@@ -23,7 +23,7 @@ endif
TARGET = jk_botti_mm
BASEFLAGS = -Wall -Wno-write-strings
-ARCHFLAG += -march=k8 -mtune=generic
+ARCHFLAG += -march=i686 -mtune=generic
ifeq ($(DBG_FLGS),1)
OPTFLAGS = -O0 -g
View
11 util.cpp
@@ -816,11 +816,17 @@ qboolean FVisibleEnemy( const Vector &vecOrigin, edict_t *pEdict, edict_t *pEnem
if(FVisibleEnemyOffset( vecOrigin, feet_offset, pEdict, pEnemy ))
return(TRUE);
}
-
+
// check center
if(FVisibleEnemyOffset( vecOrigin, Vector(0, 0, 0), pEdict, pEnemy ))
return(TRUE);
+#if 0
+ /*
+ * For long time this part was unintentionally disabled. Everything worked
+ * just fine. And enabling this appears to increase CPU usage quite abit.
+ * So keep this disabled after all.
+ */
if (pEnemy->v.solid != SOLID_BSP) {
// construct sideways vector
Vector v_right = UTIL_AnglesToRight(UTIL_VecToAngles(vecOrigin - GetGunPosition(pEdict)));
@@ -835,7 +841,8 @@ qboolean FVisibleEnemy( const Vector &vecOrigin, edict_t *pEdict, edict_t *pEnem
if(FVisibleEnemyOffset( vecOrigin, left_offset, pEdict, pEnemy ))
return(TRUE);
}
-
+#endif
+
return(FALSE);
}

0 comments on commit e00ec9e

Please sign in to comment.