Skip to content

Commit 593a341

Browse files
committed
speed up the inventory system in TF
1 parent c261e69 commit 593a341

File tree

4 files changed

+21
-0
lines changed

4 files changed

+21
-0
lines changed

game/quiver/info_changelog.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Details:
88
- Suppressed the "Node Graph out of Date. Rebuilding..." message.
99
- Fixed zoomed-in viewmodels flipping upside down at higher FOVs.
1010
- Fixed env_sun sprite disappearing when you look at it.
11+
- Fixed issues with the inventory system.
1112

1213
Quiver Private Alpha 1.1.0:
1314
Whitelists:

src/game/client/tf/tf_gc_client.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,12 +308,16 @@ void CTFGCClientSystem::InvalidatePingData()
308308
// Backoff api
309309
void CTFGCClientSystem::WebapiInventoryState_t::Backoff()
310310
{
311+
#ifdef BDSBASE
312+
RequestSucceeded();
313+
#else
311314
if ( m_nBackoffSec == 0 )
312315
m_nBackoffSec = 20;
313316
else
314317
m_nBackoffSec = (m_nBackoffSec * 12 + 9) / 10; // exponential backoff @ 1.2x factor, round up
315318

316319
m_rtNextRequest = CRTime::RTime32TimeCur() + m_nBackoffSec;
320+
#endif
317321
}
318322

319323
void CTFGCClientSystem::WebapiInventoryState_t::RequestSucceeded()
@@ -324,7 +328,11 @@ void CTFGCClientSystem::WebapiInventoryState_t::RequestSucceeded()
324328

325329
bool CTFGCClientSystem::WebapiInventoryState_t::IsBackingOff()
326330
{
331+
#ifdef BDSBASE
332+
return false;
333+
#else
327334
return m_rtNextRequest != 0 && CRTime::RTime32TimeCur() <= m_rtNextRequest;
335+
#endif
328336
}
329337

330338
void CTFGCClientSystem::WebapiInventoryThink()

src/game/server/tf/tf_gc_server.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4029,12 +4029,16 @@ ConVar tf_mm_trusted( "tf_mm_trusted", "0", FCVAR_NOTIFY | FCVAR_HIDDEN,
40294029
// Backoff api
40304030
void CTFGCServerSystem::WebapiEquipmentState_t::Backoff()
40314031
{
4032+
#ifdef BDSBASE
4033+
RequestSucceeded();
4034+
#else
40324035
if ( m_nBackoffSec == 0 )
40334036
m_nBackoffSec = 20;
40344037
else
40354038
m_nBackoffSec = ( m_nBackoffSec * 12 + 9 ) / 10; // exponential backoff @ 1.2x factor, round up
40364039

40374040
m_rtNextRequest = CRTime::RTime32TimeCur() + m_nBackoffSec;
4041+
#endif
40384042
}
40394043

40404044
void CTFGCServerSystem::WebapiEquipmentState_t::RequestSucceeded()
@@ -4045,7 +4049,11 @@ void CTFGCServerSystem::WebapiEquipmentState_t::RequestSucceeded()
40454049

40464050
bool CTFGCServerSystem::WebapiEquipmentState_t::IsBackingOff()
40474051
{
4052+
#ifdef BDSBASE
4053+
return false;
4054+
#else
40484055
return m_rtNextRequest != 0 && CRTime::RTime32TimeCur() <= m_rtNextRequest;
4056+
#endif
40494057
}
40504058

40514059
CTFGCServerSystem::WebapiEquipmentState_t& CTFGCServerSystem::FindOrCreateWebapiEquipmentState( CSteamID steamID )

src/game/shared/tf/tf_item_inventory.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1091,6 +1091,10 @@ void CTFPlayerInventory::LoadLocalLoadout()
10911091
pLoadoutKV->deleteThis();
10921092

10931093
GTFGCClientSystem()->LocalInventoryChanged();
1094+
1095+
#ifdef BDSBASE
1096+
SendInventoryUpdateEvent();
1097+
#endif
10941098
}
10951099

10961100
//-----------------------------------------------------------------------------

0 commit comments

Comments
 (0)