diff --git a/dev/3.2-movements/source/dlls/player.cpp b/dev/3.2-movements/source/dlls/player.cpp index 1f990b53..eb6761bc 100644 --- a/dev/3.2-movements/source/dlls/player.cpp +++ b/dev/3.2-movements/source/dlls/player.cpp @@ -3124,6 +3124,7 @@ void CBasePlayer::Spawn( void ) m_bitsDamageType = 0; m_afPhysicsFlags = 0; m_fLongJump = FALSE;// no longjump module. + mForceWeaponUpdateFlag = true; g_engfuncs.pfnSetPhysicsKeyValue( edict(), "slj", "0" ); g_engfuncs.pfnSetPhysicsKeyValue( edict(), "hl", "1" ); @@ -4220,8 +4221,9 @@ void CBasePlayer :: UpdateClientData( void ) bool forceCurWeaponUpdate = false; - if (!m_fKnownItem) + if (!m_fKnownItem /* || this->mForceWeaponUpdateFlag*/ ) { + this->mForceWeaponUpdateFlag = false; m_fKnownItem = TRUE; @@ -4246,7 +4248,6 @@ void CBasePlayer :: UpdateClientData( void ) // :tankefugl } - SendAmmoUpdate(); // Update all the items diff --git a/dev/3.2-movements/source/dlls/player.h b/dev/3.2-movements/source/dlls/player.h index 8024e97d..42a321b7 100644 --- a/dev/3.2-movements/source/dlls/player.h +++ b/dev/3.2-movements/source/dlls/player.h @@ -161,6 +161,8 @@ public: BOOL m_fNoPlayerSound; // a debugging feature. Player makes no sound if this is true. BOOL m_fLongJump; // does this player have the longjump module? + bool mForceWeaponUpdateFlag; + float m_tSneaking; int m_iUpdateTime; // stores the number of frame ticks before sending HUD update messages int m_iClientHealth; // the health currently known by the client. If this changes, send a new diff --git a/dev/3.2-movements/source/mod/AvHPlayer.cpp b/dev/3.2-movements/source/mod/AvHPlayer.cpp index 1f6d2870..7c509a89 100644 --- a/dev/3.2-movements/source/mod/AvHPlayer.cpp +++ b/dev/3.2-movements/source/mod/AvHPlayer.cpp @@ -9104,6 +9104,8 @@ void AvHPlayer::UpdateInventoryEnabledState(int inNumActiveHives, bool inForceUp // Have we not yet updated our weapons with this # of hives? if((inNumActiveHives != this->mNumHives) || (inForceUpdate)) { + this->mForceWeaponUpdateFlag = true; + for(int i = 0; i < MAX_ITEM_TYPES; i++) { AvHBasePlayerWeapon* theActiveWeapon = dynamic_cast(this->m_rgpPlayerItems[i]);