Add husk soldier class to ai_allymanager#296
Add husk soldier class to ai_allymanager#296Blixibon wants to merge 1 commit intoentropy-zero:ez2/mapbasefrom
Conversation
| #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" ) ) |
There was a problem hiding this comment.
What about other derivatives of the Combine soldier like Bad Cop, Clone Cop, and the Combine assassins?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
1upD
left a comment
There was a problem hiding this comment.
Per the comments, let's make this apply to all derivatives of npc_combine_s which can use the squad mechanics
This PR adds
npc_husk_soldiertoai_allymanageras an alternate classname for Combine soldiers. This allowsai_allymanagerto respect commandable husks when determining how many allies the player has available.Note that
CNPC_HuskSoldier::IsCommandableexplicitly checks whether the husk likes the player, so this will only count husks which are both commandable and friendly with the player.