Skip to content

Snarks enemy selection rework#358

Open
MyGamepedia wants to merge 5 commits intoampreeT:masterfrom
MyGamepedia:snark-team-fix
Open

Snarks enemy selection rework#358
MyGamepedia wants to merge 5 commits intoampreeT:masterfrom
MyGamepedia:snark-team-fix

Conversation

@MyGamepedia
Copy link
Contributor

Fixes #300
Replaces teamnum value to make IsValidEnemy() pass players even if mp_teamplay is enabled to make snarks aggressive to all players, just like in sp/dm. Filtered map-placed snarks for certain reasons.
Includes ENTPATCH_BM_SNARK macro.

@MyGamepedia
Copy link
Contributor Author

okay, this doesn't work somehow, i'll rework it.

@MyGamepedia
Copy link
Contributor Author

Turns out this needs to be done with a delay.

@ampreeT
Copy link
Owner

ampreeT commented Feb 22, 2026

Hey I don't think that implementing snark aggression against players is a good idea as it would be easier to grief (spawn, throw snarks, suicide, repeat). In fact, it may be better for snarks to ignore players/friendly npcs regardless of mp_teamplay and to instead use mp_friendlyfire to dictate snark aggression. @Alienmario wdyt?

@Alienmario
Copy link
Collaborator

Yeah, mp_friendlyfire makes sense here.

@MyGamepedia
Copy link
Contributor Author

Hey I don't think that implementing snark aggression against players is a good idea as it would be easier to grief (spawn, throw snarks, suicide, repeat). In fact, it may be better for snarks to ignore players/friendly npcs regardless of mp_teamplay and to instead use mp_friendlyfire to dictate snark aggression. @Alienmario wdyt?

good idea.

@MyGamepedia MyGamepedia changed the title Snarks not aggressive to players path for teamplay Snarks enemy selection rework Feb 23, 2026
- Added hook for IsValidEnemy on snark to filter ally NPC and teammates.
- Added IsPlayerAlly method for CAI_BaseNPC methodmap.
- Added CNpc_Snark methodmap from necro_multipatch.
@MyGamepedia
Copy link
Contributor Author

Hey I don't think that implementing snark aggression against players is a good idea as it would be easier to grief (spawn, throw snarks, suicide, repeat). In fact, it may be better for snarks to ignore players/friendly npcs regardless of mp_teamplay and to instead use mp_friendlyfire to dictate snark aggression. @Alienmario wdyt?

Done in the way as described here. Guard and scientists still aren't happy to see player's snarks, but I guess it's fine ?

@MyGamepedia
Copy link
Contributor Author

I have working filter for ally NPCs now, the only issue is that they still can ask for help.

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.

Reset npc_snark's teamnum via OnSpawnPost

3 participants