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

Add husk soldier class to ai_allymanager #296

Open
wants to merge 1 commit into
base: ez2/mapbase
Choose a base branch
from

Conversation

Blixibon
Copy link
Collaborator

This PR adds npc_husk_soldier to ai_allymanager as an alternate classname for Combine soldiers. This allows ai_allymanager to respect commandable husks when determining how many allies the player has available.

Note that CNPC_HuskSoldier::IsCommandable explicitly checks whether the husk likes the player, so this will only count husks which are both commandable and friendly with the player.

@@ -164,7 +164,7 @@ void CAI_AllyManager::CountAllies( int *pTotal, int *pMedics )

#ifdef EZ
// Blixibon - The soldiers' "IsCommandable" function only checks the spawnflag, so it's fine here
if( FClassnameIs( ppAIs[i], "npc_combine_s" ) )
if( FClassnameIs( ppAIs[i], "npc_combine_s" ) || FClassnameIs( ppAIs[i], "npc_husk_soldier" ) )
Copy link

Choose a reason for hiding this comment

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

What about other derivatives of the Combine soldier like Bad Cop, Clone Cop, and the Combine assassins?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I've actually never thought about that 🤔

We should add them in the future, but I think I'd rather sort that out in another PR unless you think we should hold off on this one otherwise.

Copy link

Choose a reason for hiding this comment

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

I think we should hold off on this one just because I think it's unlikely we'll return to this issue and I could see this being needed for assassins at least. Some poor mapper is going to need it for Clone Cops or Bad Cops too. Maybe it should check if the entity is descended from the base Combine class?

Copy link

@1upD 1upD left a comment

Choose a reason for hiding this comment

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

Per the comments, let's make this apply to all derivatives of npc_combine_s which can use the squad mechanics

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.

2 participants