Fix Missing Player Animations: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
(made the article a bit clearer and removed two templates (multiple issues and pov (I don't know where the pov problem was)))
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
This article only applies to the latest HL2DM OB SDK (06/15/2009).
{{Orphan|date=January 2024}}


By default, the 06/15/2009 Source SDK update includes source code that makes several calls to swimming animations that do not yet exist with the current HL2DM player animations. As a result, whenever water goes up to a player's waist, the models go into their reference pose and glide around.
{{Note|This article only applies to the {{srcmp|4|nt=0}} SDK.}}


== The Fix ==
By default, the Source 2009 SDK includes source code that makes several calls to swimming animations that do not yet exist with the current {{hl2dm|3.1}} player animations. As a result, whenever water goes above a player's waist, the models go into their reference pose.
Here's how to fix this issue:


'''multiplayer_animstate.cpp'''
To fix this issue, open {{path|multiplayer_animstate|cpp}} and in the {{Code|highlight=c|bool CMultiPlayerAnimState::HandleSwimming( Activity &idealActivity )}} function,
 
''bool CMultiPlayerAnimState::HandleSwimming( Activity &idealActivity )''


Change:
Change:
Line 15: Line 12:
<pre>idealActivity = ACT_MP_RUN;</pre>
<pre>idealActivity = ACT_MP_RUN;</pre>


Now whenever water goes up to a player's waist, the code will call for the HL2DM run animation, which is a good alternative because it already exists in the current HL2DM player animations and makes the player look as though they are actually swimming and wading though the water.
Now, whenever water goes up to a player's waist, the code will call for the {{hl2dm|3.1}} run animation, which is a good alternative because it already exists and makes the player look like they are swimming and wading through the water.


[[Category:Tutorials]]
[[Category:Tutorials]]
[[Category:Programming]]
[[Category:Programming]]
[[Category:Bug fixes]]
[[Category:Bug fixes]]

Latest revision as of 17:54, 19 January 2025

Note.pngNote:This article only applies to the Source Multiplayer Source 2009 Multiplayer SDK.

By default, the Source 2009 SDK includes source code that makes several calls to swimming animations that do not yet exist with the current Half-Life 2: Deathmatch player animations. As a result, whenever water goes above a player's waist, the models go into their reference pose.

To fix this issue, open 🖿multiplayer_animstate.cpp and in the bool CMultiPlayerAnimState::HandleSwimming( Activity &idealActivity ) function,

Change:

idealActivity = ACT_MP_SWIM;

...to...

idealActivity = ACT_MP_RUN;

Now, whenever water goes up to a player's waist, the code will call for the Half-Life 2: Deathmatch run animation, which is a good alternative because it already exists and makes the player look like they are swimming and wading through the water.