Permalink
Browse files

Uninline FInViewCone()

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
  • Loading branch information...
1 parent ccb9b89 commit bedbb7e1e479210c9fdeb12644218bec5c83a571 @jkivilin committed Jan 27, 2013
Showing with 10 additions and 8 deletions.
  1. +1 −1 bot_combat.cpp
  2. +0 −7 bot_inline_funcs.h
  3. +7 −0 util.cpp
  4. +2 −0 util.h
View
@@ -792,7 +792,7 @@ void BotRemoveEnemy( bot_t &pBot, qboolean b_keep_tracking )
//
void BotFindEnemy( bot_t &pBot )
{
-#define DEBUG_ENEMY_SELECT 1
+//#define DEBUG_ENEMY_SELECT 1
#if DEBUG_ENEMY_SELECT
char info[1024];
const char *enemy_type = "";
View
@@ -129,13 +129,6 @@ inline void UTIL_ParticleEffect( const Vector &vecOrigin, const Vector &vecDirec
PARTICLE_EFFECT( vecOrigin, vecDirection, (float)ulColor, (float)ulCount );
}
-inline qboolean FInViewCone(const Vector & Origin, edict_t *pEdict)
-{
- const float fov_angle = 80;
-
- return(DotProduct((Origin - pEdict->v.origin).Normalize(), UTIL_AnglesToForward(pEdict->v.v_angle)) > cos(deg2rad(fov_angle)));
-}
-
inline qboolean FIsClassname(edict_t * pent, const char * cname)
{
return(likely(pent)?strcmp(STRING(pent->v.classname), cname)==0:FALSE);
View
@@ -1056,3 +1056,10 @@ qboolean IsAlive(const edict_t *pEdict)
!(pEdict->v.flags & FL_NOTARGET) && ((int)pEdict->v.takedamage != 0) &&
(pEdict->v.solid != SOLID_NOT);
}
+
+qboolean FInViewCone(const Vector & Origin, edict_t *pEdict)
+{
+ const float fov_angle = 80;
+
+ return(DotProduct((Origin - pEdict->v.origin).Normalize(), UTIL_AnglesToForward(pEdict->v.v_angle)) > cos(deg2rad(fov_angle)));
+}
View
2 util.h
@@ -60,3 +60,5 @@ qboolean IsPlayerChatProtected(edict_t * pPlayer);
Vector VecBModelOrigin(edict_t *pEdict);
qboolean IsAlive(const edict_t *pEdict);
+
+qboolean FInViewCone(const Vector & Origin, edict_t *pEdict);

0 comments on commit bedbb7e

Please sign in to comment.