Skip to content

Commit b5a6198

Browse files
committed
added GetAnimStaticAssociation prototype to CAnimManagerSA class and added gateway animation constant, value is set to "run_wuzi" for gateway animation
1 parent 098da77 commit b5a6198

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

Client/game_sa/CAnimManagerSA.h

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,22 @@
7272
#define FUNC_RpAnimBlendClumpGetNumAssociations 0x4d6b60
7373
#define FUNC_RpAnimBlendClumpUpdateAnimations 0x4d34f0
7474

75+
// This animation name will allow us to play custom animations by simply playing
76+
// this animation and then in AddAnimation and AddAnimationAndSync hook, we can
77+
// return our custom animation in the hook instead of run_wuzi. This will trick GTA SA into thinking
78+
// that it is playing run_wuzi, but in reality, it's playing our custom animation, and Of course, we can
79+
// return run_wuzi animation within the hook if we want to play it instead. Why run_wuzi?
80+
// We can also use another animation, but I've tested with this one mostly, so let's stick to this.
81+
const SString GATEWAY_ANIMATION_NAME = "run_wuzi";
82+
7583
class CAnimManagerSAInterface
7684
{
7785
public:
7886
};
7987

8088
class CAnimManagerSA : public CAnimManager
8189
{
90+
typedef CAnimBlendStaticAssociationSAInterface * StaticAssocIntface_type;
8291
typedef std::map < RpClump *, CClientPed * > ClumpMap_type;
8392

8493
public:
@@ -108,7 +117,7 @@ class CAnimManagerSA : public CAnimManager
108117
const char * GetAnimBlockName ( AssocGroupId groupID );
109118

110119
CAnimBlendAssociation * CreateAnimAssociation ( AssocGroupId animGroup, AnimationId animID );
111-
CAnimBlendAssociation * GetAnimAssociation ( AssocGroupId animGroup, AnimationId animID );
120+
StaticAssocIntface_type GetAnimStaticAssociation ( AssocGroupId animGroup, AnimationId animID );
112121
CAnimBlendAssociation * GetAnimAssociation ( AssocGroupId animGroup, const char * szAnimName );
113122
CAnimBlendAssociation * AddAnimation ( RpClump * pClump, AssocGroupId animGroup, AnimationId animID );
114123
CAnimBlendAssociation * AddAnimation ( RpClump * pClump, CAnimBlendHierarchy *, int ID );
@@ -150,6 +159,8 @@ class CAnimManagerSA : public CAnimManager
150159
CAnimBlock * GetAnimBlock ( CAnimBlockSAInterface * pInterface );
151160
CAnimBlendHierarchy * GetAnimBlendHierarchy ( CAnimBlendHierarchySAInterface * pInterface );
152161

162+
bool isGateWayAnimationHierarchy ( CAnimBlendHierarchySAInterface * pInterface );
163+
153164
// This is used in AddAnimationHandler and AddAnimationAndSyncHandler for playing
154165
// custom animations and to help in replacing and restoring animations
155166
void InsertPedClumpToMap ( RpClump * pClump, CClientPed * pClientPed );

0 commit comments

Comments
 (0)