@@ -41,6 +41,22 @@ CTFParachute::CTFParachute()
41
41
// -----------------------------------------------------------------------------
42
42
void CTFParachute::CreateBanner ()
43
43
{
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
44
60
BaseClass::CreateBanner ();
45
61
46
62
#ifdef CLIENT_DLL
@@ -51,6 +67,7 @@ void CTFParachute::CreateBanner()
51
67
m_hBannerEntity->ResetSequence ( sequence );
52
68
}
53
69
#endif // CLIENT_DLL
70
+ #endif
54
71
}
55
72
56
73
@@ -91,6 +108,50 @@ void CTFParachute::ParachuteAnimThink( void )
91
108
bInCondition = false ;
92
109
}
93
110
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
94
155
// Track Anim State
95
156
if ( m_iParachuteAnimState == EParachuteDeployed_Idle && !bInCondition )
96
157
{
@@ -123,6 +184,7 @@ void CTFParachute::ParachuteAnimThink( void )
123
184
m_hBannerEntity->ResetSequence ( sequence );
124
185
m_iParachuteAnimState = EParachuteDeployed_Idle;
125
186
}
187
+ #endif
126
188
}
127
189
128
190
#endif // CLIENT_DLL
0 commit comments