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?
Conversation
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 ) |
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.
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 comment
The reason will be displayed to describe this comment to others. Learn more.
A better heuristic can never hurt. The current heuristic is in BotFindBestEnemy
.
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.
// 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 |
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
The thing is: with our current gameplay, destroying a turret is almost always a more valuable goal than killing a player. I am not yet conviced if this is a proper solution. |
If attacked by a turret: choose a new goal. Most often, this will be one of the turrets. Attacking them is a good idea.