-
Notifications
You must be signed in to change notification settings - Fork 152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
alien bots: do not chase players when attacked by turrets #2933
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2493,6 +2493,17 @@ static gentity_t *BotPopEnemy( enemyQueue_t *queue ) | |
|
||
void BotPain( gentity_t *self, gentity_t *attacker, int ) | ||
{ | ||
// alien bots should not chase human players when attacked by turrets | ||
if ( G_Team( self ) == TEAM_ALIENS | ||
&& G_Team( attacker ) != TEAM_NONE | ||
&& attacker->s.modelindex == BA_H_MGTURRET | ||
&& self->botMind->goal.targetsValidEntity() | ||
&& self->botMind->goal.getTargetedEntity()->s.eType == entityType_t::ET_PLAYER ) | ||
Comment on lines
+2497
to
+2501
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you think there should be some type of heuristic for tradeoff between pursuing into a base (ie, human attacker equipment > bot value) or is this sufficient. Can this be abused by players by simply building a turret to have bots discourage people from attacking? Lastly, should this consider rocket pods as well, or is the range too great for this to be effective? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A better heuristic can never hurt. The current heuristic is in I assume it can be abused. But the current situation can be abused even more. Build a wall of turrets, make an alien bot chase you, run to the wall and jump over it. The bots will not even try to attack the turrets. A tyrant will get stuck there, because it cannot jump over. Rocket pod range is too high for a simple solution. |
||
{ | ||
BotChangeGoalEntity( self, self ); // reset goal | ||
return; | ||
} | ||
|
||
if ( G_Team( attacker ) != TEAM_NONE | ||
&& !G_OnSameTeam( self, attacker ) | ||
&& attacker->s.eType == entityType_t::ET_PLAYER | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should check that the attacker is a buildable before reading modelindex