Skip to content

Comments

[TF2] Use correct activity in C_BaseObject placement hack#1813

Open
inco-cc wants to merge 1 commit intoValveSoftware:masterfrom
inco-cc:building-anim-fix
Open

[TF2] Use correct activity in C_BaseObject placement hack#1813
inco-cc wants to merge 1 commit intoValveSoftware:masterfrom
inco-cc:building-anim-fix

Conversation

@inco-cc
Copy link

@inco-cc inco-cc commented Feb 23, 2026

This modifies an existing hack in C_BaseObject::Simulate to set the correct activity on the client when an object is placed on the server before the client knows that it was a valid placement position. It also restores its animation playback rate prior to setting the activity, since setting an activity resets the playback rate to 1.0.

Currently, the hack sets the ACT_OBJ_RUNNING activity, which makes objects appear dormant while they're being built. This modification sets ACT_OBJ_ASSEMBLING if the object is currently being built, otherwise it uses ACT_OBJ_RUNNING.

This also prevents another related issue in MvM where a teleporter will start playing its spin animation after being placed in this particular edge case, even when its matching teleporter isn't online.

Before:

before.webm
before-mvm.webm

After:

after.webm
after-mvm.webm

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