
oh, yes I'm sure of that, but if we think that it has been written quite a long
time ago, I will just lay back refactoring.
Ok, I tried changing the InFieldOFView to always see 360. I think its working. Now for
my next step I added the following to the "findEnemy" function, but don't think it works
correctly. It notes the Print output once for 270 (which is a test degree), but not
sure if it works properly.
Here's what I messed with:
Code: Select all
//check if the enemy is visible
vis = BotEntityVisible(bs->entitynum, bs->eye, bs->viewangles, f, i);
if (vis <= 0) {
BotAI_Print( PRT_MESSAGE, "AGENT SAYS: Enemy is detectable.\n"); //gmod
continue;
}
detect = findradius (detect, bs->enemyorigin, 270);
if (detection = 270)
BotAI_Print( PRT_MESSAGE, "AGENT SAYS: Enemy is detected at 270.\n"); //gmod
Now, findradius is a function that calculates the radius between 2 objects (hopefully)
and so I just set that to get some feedback from the screen if it matches when the
player is 270 deg. towards the bot.
Making any sense
