@@ -41,6 +41,22 @@ CTFParachute::CTFParachute()
4141// -----------------------------------------------------------------------------
4242void CTFParachute::CreateBanner ()
4343{
44+ #ifdef BDSBASE
45+ #ifdef CLIENT_DLL
46+ if (m_hBannerEntity)
47+ return ;
48+
49+ BaseClass::CreateBanner ();
50+
51+ if (m_hBannerEntity)
52+ {
53+ m_iParachuteAnimState = EParachuteRetracted_Idle;
54+ int sequence = m_hBannerEntity->SelectWeightedSequence (ACT_PARACHUTE_RETRACT_IDLE);
55+ m_hBannerEntity->ResetSequence (sequence);
56+ m_flParachuteToIdleTime = -1 ;
57+ }
58+ #endif // CLIENT_DLL
59+ #else
4460 BaseClass::CreateBanner ();
4561
4662#ifdef CLIENT_DLL
@@ -51,6 +67,7 @@ void CTFParachute::CreateBanner()
5167 m_hBannerEntity->ResetSequence ( sequence );
5268 }
5369#endif // CLIENT_DLL
70+ #endif
5471}
5572
5673
@@ -91,6 +108,50 @@ void CTFParachute::ParachuteAnimThink( void )
91108 bInCondition = false ;
92109 }
93110
111+ #ifdef BDSBASE
112+ bool bIsDeployed = m_iParachuteAnimState == EParachuteDeployed || m_iParachuteAnimState == EParachuteDeployed_Idle;
113+ int iAct = -1 ;
114+
115+ // Track Anim State
116+ if (m_flParachuteToIdleTime < gpGlobals->curtime && m_flParachuteToIdleTime != -1 )
117+ {
118+ if (m_iParachuteAnimState == EParachuteDeployed)
119+ {
120+ iAct = ACT_PARACHUTE_DEPLOY_IDLE;
121+ m_iParachuteAnimState = EParachuteDeployed_Idle;
122+ }
123+ else
124+ {
125+ iAct = ACT_PARACHUTE_RETRACT_IDLE;
126+ m_iParachuteAnimState = EParachuteRetracted_Idle;
127+ }
128+ m_flParachuteToIdleTime = -1 ;
129+ }
130+
131+ if (bIsDeployed != bInCondition)
132+ {
133+ if (bInCondition)
134+ {
135+ iAct = ACT_PARACHUTE_DEPLOY;
136+ m_iParachuteAnimState = EParachuteDeployed;
137+ }
138+ else
139+ {
140+ iAct = ACT_PARACHUTE_RETRACT;
141+ m_iParachuteAnimState = EParachuteRetracted;
142+ }
143+ }
144+
145+ if (iAct != -1 )
146+ {
147+ int sequence = m_hBannerEntity->SelectWeightedSequence (iAct);
148+ m_hBannerEntity->ResetSequence (sequence);
149+ if (m_iParachuteAnimState == EParachuteDeployed || m_iParachuteAnimState == EParachuteRetracted)
150+ {
151+ m_flParachuteToIdleTime = m_hBannerEntity->SequenceDuration () + gpGlobals->curtime ;
152+ }
153+ }
154+ #else
94155 // Track Anim State
95156 if ( m_iParachuteAnimState == EParachuteDeployed_Idle && !bInCondition )
96157 {
@@ -123,6 +184,7 @@ void CTFParachute::ParachuteAnimThink( void )
123184 m_hBannerEntity->ResetSequence ( sequence );
124185 m_iParachuteAnimState = EParachuteDeployed_Idle;
125186 }
187+ #endif
126188}
127189
128190#endif // CLIENT_DLL
0 commit comments