33 lines
3.4 KiB
Markdown
33 lines
3.4 KiB
Markdown
# Duel countdown milliseconds — 2026-11-27
|
||
|
||
SMSG_DUEL_COUNTDOWN0x2b7 is a supported route outside the eleven historical state-dependent routes. The coverage audit lists it but no direct integrated test was found. The genuine source3000 packet was silently dropped by the gateway's invented >60 seconds cap; values1..60 were multiplied by1000. The fix preserves the source uint32 duration as milliseconds, using the existing native opcode0x4d001e. No new duel-state admission policy or native opcode is introduced.
|
||
|
||
## Source and maintained native proof
|
||
|
||
Source root `/mnt/Games/@project/build/source-server-main-20261124/source/src/game`:
|
||
|
||
- `Handlers/DuelHandler.cpp:66–71`: records current startTimer and calls SendDuelCountdown(3000) for both players.
|
||
- `Objects/Player.cpp:23247`: writes the argument unchanged as uint32. Its inline “seconds” comment is contradicted by the actual caller and timer logic.
|
||
- `Objects/Player.cpp:19288`: waits until startTimer+3 before starting combat. Thus3000 describes the three-second countdown in milliseconds.
|
||
|
||
Maintained native root `/mnt/Games/@project/servers/trinity-forever/src/server/game`:
|
||
|
||
- `Handlers/DuelHandler.cpp:72–81`: sets StartTime=now+3 and constructs DuelCountdown(3000), explicitly milliseconds.
|
||
- `Server/Packets/DuelPackets.cpp:46`: writes Countdown unchanged as uint32.
|
||
|
||
This establishes the exact unit correction using both producers/writer. It does not claim fresh original70334 reader dispatch or actual in-game display acceptance; the existing route opcode is retained. No binary scan.
|
||
|
||
## Integrated regression
|
||
|
||
Added direct cases to [source_combat_event_test.cpp](../../../../tests/source_combat_event_test.cpp#L38), through real NativeWorldTranslation::translate and full output-envelope parsing. Before correction, the first genuine3000 exact-payload assertion fails ([before log](before.log)); the fixture stops there, so no exhaustive before-failure count is claimed.
|
||
|
||
The tests cover exact native opcode/body for3000 plus zero,1,60,61,1000,60000 and UINT32_MAX. Boundary values verify no hidden seconds threshold, scaling or overflow is introduced into the uint32 contract. They do not claim all these durations are produced by the current server. Countdown preserves pending duel identity/target. Every truncation and a trailing byte are rejected, followed by a valid3000 recovery. This adds23 assertions to the357-check combat fixture.
|
||
|
||
The host validation reuses the pinned75d0ba65 native/protocol library snapshot with headers from6dc6e75a. Only the changed world_translation translation unit is compiled and linked directly into the changed fixture; all other runtime functions come from the pinned shared library. This is a focused integrated route check, not a full native rebuild, release binary, codec build or full gate. Library hashes are in [host-inputs.json](host-inputs.json).
|
||
|
||
After correction: **380 assertions PASS, zero failures** ([after log](after.log), [receipt](receipt.json)). Compilation used C++20 with `-Wall -Wextra -Wpedantic -Werror`; the world unit reused the paired gameobject and staged item-render profile defines from the integration build.
|
||
|
||
## Scope
|
||
|
||
Changes are limited to the countdown parser field name, the countdown case in world_translation, the existing combat fixture, and this evidence. No other duel handshake or lifecycle behavior changes. Parent timestamp39/rollup work is untouched. No client/install/push actions. Live native countdown display remains an external acceptance boundary.
|