diff --git a/t6/NOTES.md b/t6/NOTES.md index 8bcb4aa..1e18bdf 100644 --- a/t6/NOTES.md +++ b/t6/NOTES.md @@ -14,7 +14,7 @@ telemetry and leaderboard modules; neither includes bank or database modules. | Enemy count | Stock `_zm_utility::get_current_zombie_count()` plus queued zombies | Uses the map's zombie team and enemy filters | | Timers | Seed elapsed time for late joiners; stop round watcher/reset on game over | T6 timer behavior; keep frozen timers frozen | | AFK | Maintain control freeze, disable guns/grenades, guard player state and stale grace threads | Requested movement/shooting fix; retain `.afk` / `.back` and two-second grace | -| Telemetry | Global `httpPost(url, options)`; T5-parity queue + heartbeat + game_start/end + watchdog + log-level dvar; per-player `guid` sources from Plutonium's `player.guid` engine property (T5 uses `player getGuid()` method); per-match `kills`/`headshots`/`downs`/`revives` fall back to `0` when `player.stats[]` is unpopulated | T6 has no `getGuid` method but exposes the persistent identity as `.guid` on the player entity; `_zm_stats` writes only into persistent stat storage, so `player.stats[]` is not a stock T6 field. Payload keys match T5 for downstream shape parity | +| Telemetry | Global `httpPost(url, options)`; T5-parity queue + heartbeat + game_start/end + watchdog + log-level dvar; per-player `guid` sources from Plutonium's `player.guid` engine property (T5 uses `player getGuid()` method); per-match `kills`/`headshots`/`downs`/`revives` read from `player.pers[]`, with missing or negative values reported as `0` | T6 has no `getGuid` method but exposes the persistent identity as `.guid` on the player entity; stock `initpersstat` / `incpersstat` maintain match counters in `player.pers[]`, whereas T5 uses `player.stats[]`. Payload keys match T5 for downstream shape parity | | Join | Port of T5 `tws_t5_join.gsc`; uses `level.spawnplayer` / `level.custom_spawnplayer` (lowercase) and `maps\mp\zombies\_zm::spectator_respawn`; readiness gated on `self.sessionstate == "spectator"` instead of T5's `self.initialized` | T6 stock spectator respawn hook lives in `_zm.gsc`; `self.initialized` is a T5 SP zombiemode marker that T6 stock does not populate the same way | Common retains the T5 HUD constants, helpers and first-spawn dispatcher. diff --git a/t6/README.md b/t6/README.md index ada3c53..b9cfa87 100644 --- a/t6/README.md +++ b/t6/README.md @@ -134,7 +134,8 @@ and a `players` array with `name`, `guid`, `kills`, `headshots`, `downs`, `reviv and `score` per player. `guid` reads Plutonium's `player.guid` engine property (T5 uses the `player getGuid()` method — T6 has no such method, but the field is equivalent for identity purposes). `kills`/`headshots`/`downs`/`revives` read -from `player.stats[]` if a mod populates it, otherwise `0`. +from T6's stock match counters in `player.pers[]`; missing or negative values +are reported as `0`. `score` is the player's current spendable `player.score`. Delivery is asynchronous with a sequenced FIFO queue and one in-flight request. The queue survives the game-end signal so the final snapshot drains. There is no diff --git a/t6/tws_t6_telemetry.gsc b/t6/tws_t6_telemetry.gsc index 94d1135..8c0dc69 100644 --- a/t6/tws_t6_telemetry.gsc +++ b/t6/tws_t6_telemetry.gsc @@ -165,17 +165,14 @@ telemetry_nonnegative_int(value) return int(value); } -// T6 stock does not expose per-match kill/headshot/down/revive counters as a -// plain player.stats[] dictionary the way T5 does; _zm_stats writes through -// increment_client_stat / increment_player_stat into persistent stat storage. -// Read player.stats[name] when present so any mod that mirrors T5 into it -// still populates the report; otherwise emit 0 to preserve payload shape. +// T6 stock initializes and updates match counters in player.pers[] through +// _globallogic_score::initpersstat / incpersstat; getpersstat reads this array. telemetry_stat(player, name) { - if (!isDefined(player.stats) || !isDefined(player.stats[name])) + if (!isDefined(player.pers) || !isDefined(player.pers[name])) return 0; - return telemetry_nonnegative_int(player.stats[name]); + return telemetry_nonnegative_int(player.pers[name]); } telemetry_players_json(include_stats)