Skip to content

Commit 3e3eb79

Browse files
committed
1 parent dbec2b7 commit 3e3eb79

File tree

2 files changed

+63
-0
lines changed

2 files changed

+63
-0
lines changed

game/quiver/info_changelog.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ Added the following Source SDK Pull Requests:
8080
- #1515: Add "ParticleEffectStopAndDestroy" Client Effect and "DestroyImmediately" Input for info_particle_system
8181
- #1516: Fix not being able to toggle off the orthographic camera
8282
- #1517: Implement tf_stats_bogus covnvars to allow High stat tracking in modes with Increased Stats. I.E MvM
83+
- #1518: Fix the B.A.S.E. Jumpers parachute not using half of its animations
8384

8485
Details:
8586
- Fixed a bug where the mini-crit damage effect doesn't show up when your shield breaks.

src/game/shared/tf/tf_weapon_parachute.cpp

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,22 @@ CTFParachute::CTFParachute()
4141
//-----------------------------------------------------------------------------
4242
void 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

Comments
 (0)