Skip to content

Commit b44dfc1

Browse files
committed
added new functions isNextAnimationCustom, setNextAnimationCustom, and setNextAnimationNormal
1 parent bf5e7dc commit b44dfc1

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

Client/mods/deathmatch/logic/CClientPed.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,13 @@ class CClientPed : public CClientStreamElement, public CAntiCheatModule
454454
CAnimBlendAssociation * GetAnimation ( AnimationId id );
455455
CAnimBlendAssociation * GetFirstAnimation ( void );
456456

457+
bool isNextAnimationCustom ( ) { return m_bisNextAnimationCustom; }
458+
void setNextAnimationCustom ( const SString & strBlockName, const SString & strAnimationName ) { m_bisNextAnimationCustom = true; m_strCustomIFPBlockName = strBlockName; m_strCustomIFPAnimationName = strAnimationName; }
459+
460+
// This will indicate that we have played custom animation, so next animation can be internal GTA animation
461+
// You must call this function after playing a custom animation
462+
void setNextAnimationNormal ( void ) { m_bisNextAnimationCustom = false; }
463+
457464
protected:
458465
// This constructor is for peds managed by a player. These are unknown to the ped manager.
459466
CClientPed ( CClientManager* pManager, unsigned long ulModelID, ElementID ID, bool bIsLocalPlayer );
@@ -647,6 +654,12 @@ class CClientPed : public CClientStreamElement, public CAntiCheatModule
647654

648655
CVector m_vecPrevTargetPosition;
649656
uint m_uiForceLocalCounter;
657+
658+
// This is checked within AddAnimation and AddAnimationAndSync
659+
// It is set to false when custom animation is played.
660+
bool m_bisNextAnimationCustom;
661+
SString m_strCustomIFPBlockName;
662+
SString m_strCustomIFPAnimationName;
650663
};
651664

652665
#endif

0 commit comments

Comments
 (0)