With cordite in the air, splintered steel, shell casings and powder burns, there’s only one explanation...
Can we educate our bots please??

Moderator: Aerasol

BotCheckBlocked / Fix bots continously blocking each other

Postby TheDoctor » Sat Mar 31, 2012 8:30 pm

To fix the problem of bots stupidly keep running into each other, replace in void BotCheckBlocked(bot_movestate_t *ms, vec3_t dir, int checkbottom, bot_moveresult_t *result) of botlib/be_ai_move.c
Code: Select all
if ( !trace.startsolid && (trace.ent != ENTITYNUM_WORLD && trace.ent != ENTITYNUM_NONE) )
with
Code: Select all
if ((trace.ent != ENTITYNUM_WORLD && trace.ent != ENTITYNUM_NONE) ) // !trace.startsolid &&


The original problem here is that a player or bot can move too close to an entity so the "solid" flag is triggered. This might be related to players being unharmed from gauge 12 shotgun fire, when running into the barrel. The above change will not solve the original problem, but will enable reliable collision detection between entities. As consequence, the evasive strategies programmed in BotAIBlocked of game/ai_dmq3.c are re-enabled.
Image
User avatar
TheDoctor
Smokin' Amigo!
 
Posts: 767
Joined: Sun Jun 06, 2010 3:31 am



Re: BotCheckBlocked / Fix bots continously blocking each oth

Postby Joe Kari » Mon Apr 02, 2012 11:11 pm

Since you are a very good source of patch, it will be better if you have an SVN account.
If you are okey, I will ask other dev member.

(yeah, telling this in a public area is an infamous trickery, sorry for that :lol:)
User avatar
Joe Kari
SG Team
 
Posts: 878
Joined: Sun Sep 16, 2007 8:44 pm
Location: France



Re: BotCheckBlocked / Fix bots continously blocking each oth

Postby TheDoctor » Thu Apr 12, 2012 2:04 am

Joe Kari wrote:yeah, telling this in a public area is an infamous trickery, sorry for that :lol:)

I didn't fell for it, did I :wink:. Kidding aside, I wrote a PM.
Image
User avatar
TheDoctor
Smokin' Amigo!
 
Posts: 767
Joined: Sun Jun 06, 2010 3:31 am




Return to Artificial Intelligence

Show Sidebar
Show Sidebar

User Control Panel