Repository navigation
Reapply music kits when a bot joins mid-round - #12
xiaoyueyoqwq wants to merge 2 commits into
Conversation
Wait/intro cues read m_unMusicID on the inventory component. Writing MusicID without dirtying that pointer leaves the value server-side, and the 1s reconcile then sees a match and skips. Only fields that changed are written so repeated apply/reconcile calls do not resend.
Valve resets every human kit on bot_add. Inventory MusicID is rewritten to 1 on the next frame after the bot joins a team, so the Pre write still matches and is skipped. Write on bot team-join (Pre), on that next frame, on bot spawn, and on round_prestart plus its next frame. One 0.25s settle after the bot events; no extra round-event timer shotgun.
|
Closing this one, but the diagnosis is credited in the 1.0.13 notes. Instead of the per-event writes, the music reconcile now runs every tick (it was already doing the compare, and with #11 the write side is cheap), so a bot joining or spawning, the round boundary, or anything else that resets a player's kit is corrected on the next tick without guessing which event to hook. That also let me drop the bot spawn and map start timers. |
Verification successful; the solution is impressive—great work! |
Stacked on #11. Review the last commit; the flag commit is that PR.
bot_addmid-round resets every human kit. Victory and the next wait cue sample before the 1s reconcile. A Pre write onplayer_teamstill matches (inventoryMusicIDis still the selected kit) and is skipped; Valve then writesMusicIDto 1 on the next frame.What this PR does
player_teamPre) and on the following frame.round_prestartand on the following frame (MusicKitIDis cleared there).No extra round-event timer shotgun. No version string change.
ModuleVersionstays1.0.12.Depends on
#11 (
m_pInventoryServicesdirty). Merge that first; this PR then only contains the bot-timing commit.Validation:
dotnet build -c Release— 0 warnings, 0 errors.