Fixes from Anthony's list, 2026-11-09 (client + server scripts + server cfg)

1. Loot camos and camo colours on other players' guns
   Every camo animates by swapping one shared texture, and loot camos /
   colours were only put on it for the first-person gun. Other players' guns
   showed Marksman (Aqua) or the viewer's own pick. client_native/
   RankedCamoWorld.hpp gives each camo its own image and copies of the
   Intervention's third-person camo materials, added to the game's sorted
   material table while the game builds it, and swaps each player's gun
   model (players, bodies, guns on the ground) for a copy that uses them.
   Console: zeal_camo_world. Fixture: tests/native/camo_world_render.gsc.

2. Calling cards and emblems
   a) Other players' cards were wrong: cards travel as table ROW numbers, the
      server keeps the stock order and our clients move Zeal cards to page 2
      (emblems by each player's zeal_rw_icon_page). Clients now translate the
      server's row to their own at the snapshot copy (exe 0x450350).
   b) Cards picked mid-match never reached the server: the server only reads
      the stats sent on connect (IW4x's resend on closing Create a Class
      never arrives: no out-of-band header). The client now sends the new
      card / emblem by name (zeal_card, resent until zeal_card_ack), and
      zeal_challenges.gsc wears it within a second if it is earned.
   Console: zeal_card_rows, zeal_card_rows title <from> <to>.

3. AFK in the search lobby
   Live instances run g_inactivity 0, so away players stayed queued and got
   drafted. Clients report keyboard / mouse / controller idle time
   (zeal_idle, RankedAfk.hpp). After comp_lobby_afk seconds (120) a player
   leaves the queue until they are back; after comp_lobby_afk_kick (600,
   0 = never) they are removed. g_inactivity is forced 0 in the lobby only.

4. Queue rotation (community request)
   Tickets restarted with every map, so the same eight played again. The
   next match now takes: players who sat out, then winners and players who
   arrived during the match, then the losing team (both after a draw).

5. Hit registration
   Clients raise rate to 90000 (was 25000: full snapshots after spawns and
   killcams arrived late); cl_maxpackets is already 125 in IW4x. server.cfg:
   sv_maxRate 90000, sv_network_fps 200.

Second pass (independent code review + multi-client run) fixed:
- Rotation: the losers list was cleared at every match start attempt, also
  failed ones (a player leaving during the countdown), so the order was lost.
  It is now cleared only when a match really starts. The result now comes
  from the same function the ratings use (the scores when the engine names
  no team), instead of being skipped.
- AFK: "back" only counts after a report of 10 s or more idle, and that
  report goes twice, 2 s apart: one dropped by flood protection no longer
  keeps a returning player out of the queue (or gets them kicked).
- Cards: the server's confirmation (zeal_card_ack) is cleared on every new
  connection / map, so an old one can no longer swallow a new pick.
- Third-person camos: a player's loot camo loads when their pick arrives
  (their spawn, already in the search lobby), not the first time they come
  into view (up to 5 MB: a hitch while aiming at them).

Offline QA (loopback dedicated server built from the repo scripts and
server.cfg, fake bridge files, one headless client, bots):
- Camos: bot with Emberforge shows Emberforge while the viewer wears
  Obsidian; bot without loot shows Aqua; colour slot 9 shows Gold; dropped
  guns get the stock copy; video restart and a map change (mp_rust ->
  mp_terminal, material table rebuilt) keep working. Screenshots compared
  with the fix off (zeal_fx_off 4): bot showed Aqua.
- Cards: server row 510 shown as local row 27 (Overwatch, correct); mid-match
  change to Bounty Hunter + Sniperscope applied within seconds (server rows
  41 / 50 shown as 9 / 68); back to the default emblem works; an unearned
  Zeal card falls back to the default; the granted one is worn.
- AFK (test values 20 / 45 s): out of the queue at 20 s idle (presence
  queued 0, status line changes), back within 2 s of mouse input, kicked at
  45 s with "kicked for inactivity".
- Rotation: QA script with 7 bots and a faked result: order sat out, winners
  and late arrivals, losers; draw marks both teams; halftime changes nothing.
- All server scripts compile on the dedicated server. 308 Python tests pass
  (9 skipped); tests/native/loot_camo_state_test passes. No crash dumps.

Multi-client run (second pass): loopback server, 9 game clients (each its
own identity and wine prefix), real bridge-style member and loot files:
- Camos: QAP1 (Obsidian) and QAP2 (Emberforge) face to face: each sees the
  other's camo on the other's gun and their own in first person; both
  clients' zeal_camo_world agree.
- Cards: QAP2 sees QAP1's Bounty Hunter / Sniperscope; QAP1 switches mid-match
  to a granted Zeal card + emblem, applied within seconds, and QAP2 sees it
  (server rows 510 / 318 shown as 27 / 26). Unearned Zeal cards (Overwatch,
  Denied) fall back to the default.
- AFK: an idle client leaves the queue at 30 s and is removed at 75 s (test
  limits) while 8 active clients stay queued.
- Rotation through real matches: 8 searching start match 1 (the AFK player is
  not drafted); a player joins during it; the match ends through the real end
  of game hook (allies win). Match 2 takes the 4 winners and the late
  arrival, then 3 of the 4 losers; the last loser to arrive sits out and is
  first for match 3.
- No crash dumps; no client errors except one (below). Flood protection only
  dropped zeal_cosmetics_select at joins (already resent until confirmed);
  no zeal_card / zeal_idle drops.

Third pass (fixed instead of noted):
- "AimTarget_GetTagPos: Cannot find tag [j_head]" (players with a controller
  dropped on their first map): caused by Minimal Menus (zeal_menu_minimal, on
  by default). It pointed the menu materials at our blank images, and when the
  menu zones unloaded on joining, every model tag name broke for that map
  ("Part 'tag_weapon' not found" on the hands, body and gun). RankedVideo now
  swaps the menu images' textures (reference counted, like the camo code)
  instead of the materials' images, and touches nothing while the database
  loads. Repro (real player profile, first join of the session) gave 4 warnings
  and the drop every time before; 0 after, and no drop with another player
  joining.
- Hundreds of loot camos: third-person camos used one set of material copies
  per catalog camo (the material table holds 4096, a map uses ~2900). They now
  use one per player slot (18), playing whatever that player wears: 132
  copies whatever the catalog size. Checked in game: each player's gun, and a
  player rejoining with another camo (the slot switched to the new one).
- Lootbox menu: one menu item per drop, twice (a menu takes 512 items), so
  about 240 drops max. The reward reel is now 7 fixed slots that native code
  fills with the drops in view: 38 items in the menu whatever the catalog size.
  Checked with zeal_loot_preview: glove, card and camo drops roll and reveal
  with their frames and rarity glows. The menu iwd must be rebuilt for the
  release (client_menu/build.py).
- AFK report timing moved to RankedAfkReport.hpp with a native test
  (tests/native/afk_report_test.cpp): reports every 15 s, a dropped "back"
  report is repeated 2 s later and the player is not removed. The same test
  fails on the old logic.
- tests/native/loot_class_choice_test.cpp expected camo 62 to be refused; the
  value already switches to the two-character format past 61 (up to 3843).
  The test now checks that format.
- 308 Python tests OK; loot_camo_state_test, loot_class_choice_test and
  afk_report_test pass.

Not tested: a real online match with several human clients; a controller
(idle detection reads the IW4x controller runtime); Windows native D3D9
(VM has no GPU); hit registration feel (needs real players).

Deploy order: the scripts call new native methods (getZealIdle,
clearZealIdle, getZealCard, clearZealCard). A server whose DLL lacks them
fails to compile the scripts and crash-loops the map load, so deploy the
server DLL and the scripts together, at END|0. server.cfg is copied per
instance: add the two network lines to every instance's userraw/server.cfg.
Old clients keep working on new servers (no idle reports = never away; no
card command = card changes wait for the next map, as before).
