Skip to content

Commit c27eed4

Browse files
authored
Networking Module Fixes (#116)
* Fix Transmit Weapon Cache * Fix Wrong Viewmodel Transmission For First Person Spectating * Possibly Fix pClientCache Retaining Stale Data Causing (#112) * Revert pClientCache Changes
1 parent b0f250a commit c27eed4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

source/modules/networking.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1530,7 +1530,7 @@ static void hook_CBaseCombatCharacter_SetTransmit(CBaseCombatCharacter* pCharact
15301530
pActiveWeapon->SetTransmit(pInfo, bAlways);
15311531

15321532
#if !NETWORKING_USE_ENTITYCACHE // Our cache already removes them from transmit by default and expects us here to decide whos are networked.
1533-
int nEdictIndex = pEdict->m_EdictIndex-1;
1533+
int nEdictIndex = pCharacterEdict->m_EdictIndex-1;
15341534
if (!g_bFilledDontTransmitWeaponCache[nEdictIndex])
15351535
{
15361536
for ( int i=0; i < MAX_WEAPONS; ++i )
@@ -1648,7 +1648,7 @@ static void TransmitFastPathPlayer(CBasePlayer* pRecipientPlayer, int clientInde
16481648
CBasePlayer* pObserverPlayer = (CBasePlayer*)pObserverEntity;
16491649
for (int iViewModel=0; iViewModel<MAX_VIEWMODELS; ++iViewModel)
16501650
{
1651-
CBaseViewModel* pViewModel = GetViewModel(pRecipientPlayer, iViewModel);
1651+
CBaseViewModel* pViewModel = GetViewModel(pObserverPlayer, iViewModel);
16521652
if (pViewModel)
16531653
pViewModel->SetTransmit(pInfo, true);
16541654
}

0 commit comments

Comments
 (0)