Fix Missing Player Animations: Difference between revisions
Thunder4ik (talk | contribs) |
mNo edit summary |
||
Line 1: | Line 1: | ||
{{Multiple issues| | {{Multiple issues| | ||
{{ | {{pov}} | ||
{{Orphan|date=January 2024}} | {{Orphan|date=January 2024}} | ||
}} | }} | ||
This article only applies to the | This article only applies to the {{srcmp|4}} SDK. | ||
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 | 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|3.1}} player animations. As a result, whenever water goes above a player's waist, the models go into their reference pose. | ||
== The Fix == | == The Fix == | ||
Here's how to fix this issue: | Here's how to fix this issue: | ||
In {{path|multiplayer_animstate|cpp}}: | |||
In the {{Code|highlight=c|bool CMultiPlayerAnimState::HandleSwimming( Activity &idealActivity )}} function, | |||
Change: | Change: | ||
Line 20: | Line 21: | ||
<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 | 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]] |
Revision as of 12:39, 9 April 2024



You can help by

January 2024
This article only applies to the Source Multiplayer SDK.
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 Half-Life 2: Deathmatch player animations. As a result, whenever water goes above a player's waist, the models go into their reference pose.
The Fix
Here's how to fix this issue:
In multiplayer_animstate.cpp
:
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.