Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sweet235
Copy link
Contributor

If attacked by a turret: choose a new goal. Most often, this will be one of the turrets. Attacking them is a good idea.

Comment on lines +2497 to +2501
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 )
Copy link
Member

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?

Copy link
Contributor Author

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
Copy link
Contributor

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

@sweet235
Copy link
Contributor Author

sweet235 commented Mar 4, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants