Skip to content

Commit 115fcd4

Browse files
committed
1 parent e94a5db commit 115fcd4

File tree

2 files changed

+20
-15
lines changed

2 files changed

+20
-15
lines changed

game/quiver/info_changelog.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ Added the following Source SDK Pull Requests:
8484
- #1528: Add a non full charge sound check to tf_weapon_sniperrifle.cpp
8585
- #1529: Add DevMsgs for returns in CBaseCombatWeapon::WeaponSound
8686
- #1530: Allow null caller on team_control_point's SetOwner input
87+
- #1534: Fix cleanup collect on MvM currency rest logic
8788

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

src/game/server/tf/entity_currencypack.cpp

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,25 @@ void CCurrencyPack::ComeToRest( void )
195195
return;
196196
}
197197

198+
#ifdef BDSBASE
199+
// See if we've come to rest in a trigger_hurt
200+
if (IsTakingTriggerHurtDamageAtPoint(GetAbsOrigin()))
201+
{
202+
TFGameRules()->DistributeCurrencyAmount(m_nAmount);
203+
m_bTouched = true;
204+
UTIL_Remove(this);
205+
return;
206+
}
207+
208+
// Or a func_respawnroom (robots can drop money in their own spawn)
209+
if (PointInRespawnRoom(NULL, GetAbsOrigin()))
210+
{
211+
TFGameRules()->DistributeCurrencyAmount(m_nAmount);
212+
m_bTouched = true;
213+
UTIL_Remove(this);
214+
return;
215+
}
216+
#else
198217
// See if we've come to rest in a trigger_hurt
199218
for ( int i = 0; i < ITriggerHurtAutoList::AutoList().Count(); i++ )
200219
{
@@ -212,21 +231,6 @@ void CCurrencyPack::ComeToRest( void )
212231
}
213232
}
214233
}
215-
216-
#ifdef BDSBASE
217-
// Or a func_respawnroom (robots can drop money in their own spawn)
218-
for (int i = 0; i < IFuncRespawnRoomAutoList::AutoList().Count(); i++)
219-
{
220-
CFuncRespawnRoom* pRespawnRoom = static_cast<CFuncRespawnRoom*>(IFuncRespawnRoomAutoList::AutoList()[i]);
221-
Vector vecMins, vecMaxs;
222-
pRespawnRoom->GetCollideable()->WorldSpaceSurroundingBounds(&vecMins, &vecMaxs);
223-
if (IsPointInBox(GetCollideable()->GetCollisionOrigin(), vecMins, vecMaxs))
224-
{
225-
TFGameRules()->DistributeCurrencyAmount(m_nAmount);
226-
m_bTouched = true;
227-
UTIL_Remove(this);
228-
}
229-
}
230234
#endif
231235
}
232236

0 commit comments

Comments
 (0)