Skip to content

Commit

Permalink
separate logo-spray from just-wander-around
Browse files Browse the repository at this point in the history
  • Loading branch information
jkivilin committed Dec 3, 2011
1 parent 04855e3 commit 3e042a0
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions bot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1513,12 +1513,8 @@ static void HandleWallOnRight( bot_t &pBot )


//
void BotJustWanderAround(bot_t &pBot, float moved_distance)
void BotCheckLogoSpraying(bot_t &pBot)
{
edict_t *pEdict = pBot.pEdict;

// no enemy, let's just wander around...

// took too long trying to spray logo?...
if ((pBot.b_spray_logo) &&
((pBot.f_spray_logo_time + 3.0) < gpGlobals->time))
Expand Down Expand Up @@ -1655,6 +1651,18 @@ void BotJustWanderAround(bot_t &pBot, float moved_distance)
pEdict->v.idealpitch = 0;
pEdict->v.v_angle.x = 0;
}
}


//
void BotJustWanderAround(bot_t &pBot, float moved_distance)
{
edict_t *pEdict = pBot.pEdict;

// no enemy, let's just wander around...

// logo spraying...
BotCheckLogoSpraying(pBot);

// Check if walking to edge.. jump for it!
if(!FBitSet(pEdict->v.button, IN_DUCK) && !FBitSet(pEdict->v.button, IN_JUMP) && pBot.b_on_ground && !pBot.b_on_ladder &&
Expand Down

0 comments on commit 3e042a0

Please sign in to comment.