Skip to content

[HL2MP] Migrate player animations to CMultiPlayerAnimState - #2071

Open
inco-cc wants to merge 9 commits into
ValveSoftware:masterfrom
inco-cc:hl2mp_playeranimstate
Open

inco-cc wants to merge 9 commits into
ValveSoftware:masterfrom
inco-cc:hl2mp_playeranimstate

Conversation

@inco-cc

@inco-cc inco-cc commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

This converts the old CPlayerAnimState in HL2:DM to the newer CMultiPlayerAnimState used in later games like TF2.

Currently, player animations are calculated on the server, which is then sent to clients for interpolation.

CMultiPlayerAnimState makes it possible to also calculate player animations on the client and have it match the server. This resolves the issue where animations appear choppy and gestures do not play properly in thirdperson, since animations are not interpolated for the local player.

This is based on Tony Sergi's unfinished implementation from the 2007 SDK, adapted for the current SDK. It appears at some point HL2:DM was going to transition to 9-way blending for player animations. If HL2:DM ever receives newer animations, this implementation would make it a lot easier.

I didn't implement the automatic head looking behavior because I don't think it's necessary. The aim pose parameters are sufficient, and they more accurately represent where the player is actually looking.

Related issues: #35, #119, #447

Before:

before.mp4

After:

after.mp4

@speedvoltage

Copy link
Copy Markdown
Contributor

Great work on that one! Looks clean! Glad to see HL2DM is still getting some love!

speedvoltage added a commit to speedvoltage/hl2dm-fixes that referenced this pull request Sep 10, 2026
Issue: Legacy player animations produce choppy third-person gestures and prevent local gesture interpolation.

Fix: Integrate the community multiplayer animation migration and its compile, gesture-layer, weapon-switch, model-change and predicted SLAM transition corrections. Preserve the existing gameplay fixes on this separate test branch.

Source-PR: ValveSoftware#2071
Upstream-head: 47cece6

Co-authored-by: Brandon Little <blittle@inco.cc>
Lambdagon added a commit to Day-of-Conquest/DoDs-SDK2013 that referenced this pull request Sep 14, 2026
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.

2 participants