Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Bots

Development::Bots Forum for bots.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 04-15-2010, 01:23 AM
Frosef
Sarnak
 
Join Date: Mar 2010
Posts: 36
Default "Fix" for Bot LOS Issues

I say "fix" because whether or not this is a problem is a matter of opinion, really.

I didn't particularly like how bots stand around and do nothing if their target is out of their LOS, but I also understand it could cause some crazy trains if they decided to path strangely whilst moving to something.

So, my quick and dirty solution was to add another check before emptying the bot hate list to check both the bots' LOS and their owners' LOS before emptying the hate list. This way if say, a mob runs around crazylike and through the walls and it's out of both mine and my bot's LOS, the bot will wipe the hate list to prevent incident.

bot.cpp, line 2195 (inside the AIProcess function), my addition in bold:
Code:
if((!CheckLosFN(GetTarget()) && !BotOwner->CheckLosFN(GetTarget())) || GetTarget()->IsMezzed() || !IsAttackAllowed(GetTarget())) {
I don't know CPP, so I can't say for sure it's proper syntax, but it seems to be working as I expected thus far. I like the way this plays out a lot better, now my bots will round corners to assist me in dungeons and such.
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 07:21 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3