Skip to content

Co-op companion kills its human team mate, by retaliation and by firing through them #258

Description

@saworbit

A co-op companion killed its human team mate twice in two sessions on e1m2, by two different mechanisms. Both are in the QC, and neither is stock Quake friendly fire being unlucky.

Mechanism one: it shoots back

Session 2026-09-05, killed 18 seconds in. Health went 100, 76, 64, 48, 24, 4 across five hits in five seconds.

The cause is in the tape. Both parties took exactly 24 damage within one second of each other:

Carmack  hp 100 -> 76 at t 13.3
player   hp 100 -> 76 at t 13.5

Shane shot Carmack. Argus_Pain then fights back against "any live player, human or bot" with no co-op test, so it made its own team mate the enemy and killed him.

In co-op that branch can only ever fire on a team mate, because monsters do not carry classname "player".

Mechanism two: it shoots through you

Session 2026-09-05 earlier, 157 s. Killed at 425 -469 320, obituary "chewed on Carmack's boomstick", two shotgun hits.

This one never targeted the player. Two engage events in the whole session, both engage monster, none against a human. The bot was in pursue, firing at a monster's last known position during the three second sight loss hold, and the human crossed the line. Immediately after the kill it pushed GOAL_REVIVE_SUPPORT and came to help.

What is already safe

Argus_CoopFindThreat requires FL_MONSTER, so it cannot return a player.

Argus_Perceive returns before its player scan whenever coop > 0, so a companion cannot acquire a team mate as a target through perception. Worth recording because it looks like a hole on a first read and is not one.

Fix

Two guards, both gated on coop > 0 so deathmatch is untouched.

  1. Argus_Pain does not retaliate against a team mate.
  2. The combat fire gate traces the shot it is about to take and holds fire if a team mate is what it reaches.

Splash is deliberately not covered: a rocket landing beside a team mate still hurts them. Worth a follow up if it shows up in a session.

Verification is the hard part

This cannot be tested headless. A co-op botmatch runs one bot, and adding more with impulse 101 does not help, because bots never target each other in co-op anyway thanks to the perception early return. The retaliation path needs a player to damage a bot, and the lab netclient can walk and send impulses but cannot fire. See the netclient issue.

So the ladder can only show absence of harm: dm4 and dm2 at parity, and the guards provably inert on a single bot tape where Argus_IsAlly can only return FALSE and the fire trace never runs. The real verification is a human session where the companion is shot and does not shoot back.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    aiBot decision making, perception, and state machinesbugSomething isn't workingcombatWeapon selection, aim mechanics, and duel tactics

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions