Skip to content

[TF2] Fix HUD player model not immediately reflecting loadout changes - #1995

Open
Tkain wants to merge 1 commit into
ValveSoftware:masterfrom
Tkain:hud-playermodel-loadout-fix
Open

[TF2] Fix HUD player model not immediately reflecting loadout changes#1995
Tkain wants to merge 1 commit into
ValveSoftware:masterfrom
Tkain:hud-playermodel-loadout-fix

Conversation

@Tkain

@Tkain Tkain commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Description

TF2 currently has a bug where the player model in the HUD may not update in response to loadout changes. Observe the model on the lower left below:

Current behavior
Recording.2026-08-11.232252_compressed.mp4

This occurs because the HUD player model refreshes its appearance as soon as it receives notice of a loadout change by receiving the post_inventory_application game event. At this point in time, the model's code can't observe the player's updated loadout because it hasn't been reconciled by prediction yet.

This PR fixes this issue by deferring HUD model refreshes caused by loadout changes to the model's next think cycle, which will only occur after prediction finishes reconciling the player's loadout changes. This ensures that the model is only refreshed when it can access the player's latest loadout data, keeping the model's appearance up to date. See below:

With this PR
Recording.2026-08-11.230855_compressed.mp4

Right now, when the HUD's player model receives a post_inventory_application game event, it refreshes immediately in order to reflect the player's updated loadout. When this refresh is done, however, it doesn't see the player's updated loadout because it hasn't been reconciled by prediction yet. By deferring the model's refresh to our next think cycle, we ensure that this refresh only occurs after the player's loadout changes are known.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant