View Single Post
  #12  
Old 04-15-2011, 05:03 PM
lerxst2112
Demi-God
 
Join Date: Aug 2010
Posts: 1,742
Default

You could just #ifdef the bot part, although it makes the code kinda fugly.

Code:
if(cur->ent->IsClient()
#ifdef BOTS
|| cur->ent->IsBot()
#endif
)
{
...
}
A prettier alternative is something like this...

Code:
bool ShouldAttack = cur->ent->IsClient();
#ifdef BOTS
ShouldAttack = (ShouldAttack || cur->ent->IsBot());
#endif
if(ShouldAttack)
{
...
}
Reply With Quote