A player shoots another and the game reports where each bullet hit.
python3 scripts/hit_location_test.py /path/to/CoD2 --protocol {115|118} [--binary PATH] [--listen]
Writes a mod in a temporary home folder whose dm gametype spawns the first
player to join as the target, with a body model and a lot of health, and the
second one a few steps in front of it, facing it, held in place, with a
semi-automatic rifle. The second player is a minimal client (cod2client) that
presses and releases the attack button, first aiming level, at the target's
head, then 15 degrees down, at its legs; each hit makes the mod log the hit
location the game passes to Callback_PlayerDamage. So real shots go through
the server's weapon fire, its locational trace, and the target's DObj and
skeleton, which must put the head and the legs where they are.
Last it fires level again at the target looking up, whose torso and head the
player controllers turn. The target is another minimal client, on the
dedicated server or with --listen in a game a client hosts (its local server
is CoD2rev-Plus's, on the engine's collision and xanim; the host stands
aside); --listen needs a CD key in ~/.cod2/preferences and is skipped
without one. Exits with 0 when both aims hit the target, each
hit is a rifle bullet in the body parts of its aim, and nothing crashed.