Skip to content

Commit

Permalink
Make Nexus/Semperfi AIs less snobby.
Browse files Browse the repository at this point in the history
When asking them for 'help', they no longer say "Bug off" if the beacon isn't near your own structures.

Fixes ticket:3383.
  • Loading branch information
Cyp committed Oct 5, 2012
1 parent abfae5f commit bd65d57
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 22 deletions.
22 changes: 11 additions & 11 deletions data/mp/multiplay/skirmish/nexus.slo
Expand Up @@ -3260,16 +3260,16 @@ function bool attemptToHelp(int _playerToHelp, int _x, int _y)
if(haveHelpers() or _DEBUG) if(haveHelpers() or _DEBUG)
{ {
dbg("got attackers", me); dbg("got attackers", me);
if(allyBaseAtLoc(_playerToHelp, _x, _y)) //is he just trying to misuse us? //if(allyBaseAtLoc(_playerToHelp, _x, _y)) //is he just trying to misuse us?
{ //{
helpPlayer(_playerToHelp, _x, _y); helpPlayer(_playerToHelp, _x, _y);
return TRUE; return TRUE;
} //}
else //else
{ //{
dbg("ally needs no help", me); // dbg("ally needs no help", me);
messagePlayer(ALL_ALLIES, M_ANNOYED, MAX_PROBABILITY / 2); // messagePlayer(ALL_ALLIES, M_ANNOYED, MAX_PROBABILITY / 2);
} //}
} }
else else
{ {
Expand Down Expand Up @@ -3431,9 +3431,9 @@ function bool canStopHelpingAlly()
} }


/* Nothing to defend anymore */ /* Nothing to defend anymore */
if(!allyBaseAtLoc(lastHelpPlayer, helpX, helpY)){ //if(!allyBaseAtLoc(lastHelpPlayer, helpX, helpY)){
return TRUE; // return TRUE;
} //}


return FALSE; return FALSE;
} }
Expand Down
22 changes: 11 additions & 11 deletions data/mp/multiplay/skirmish/semperfi.slo
Expand Up @@ -3681,16 +3681,16 @@ function bool attemptToHelp(int _playerToHelp, int _x, int _y)
if(haveHelpers() or _DEBUG) if(haveHelpers() or _DEBUG)
{ {
dbg("got attackers", me); dbg("got attackers", me);
if(allyBaseAtLoc(_playerToHelp, _x, _y)) //is he just trying to misuse us? //if(allyBaseAtLoc(_playerToHelp, _x, _y)) //is he just trying to misuse us?
{ //{
helpPlayer(_playerToHelp, _x, _y); helpPlayer(_playerToHelp, _x, _y);
return TRUE; return TRUE;
} //}
else //else
{ //{
dbg("ally needs no help", me); // dbg("ally needs no help", me);
messagePlayer(ALL_ALLIES, M_ANNOYED, MAX_PROBABILITY / 2); // messagePlayer(ALL_ALLIES, M_ANNOYED, MAX_PROBABILITY / 2);
} //}
} }
else else
{ {
Expand Down Expand Up @@ -3852,9 +3852,9 @@ function bool canStopHelpingAlly()
} }


/* Nothing to defend anymore */ /* Nothing to defend anymore */
if(!allyBaseAtLoc(lastHelpPlayer, helpX, helpY)){ //if(!allyBaseAtLoc(lastHelpPlayer, helpX, helpY)){
return TRUE; // return TRUE;
} //}


return FALSE; return FALSE;
} }
Expand Down

1 comment on commit bd65d57

@Bertram25
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @Cyp:

A tourist question: Why did choose to comment the code?

Please sign in to comment.