From 75e0a63103497047ff5a3ec4742a76ff266f89ef Mon Sep 17 00:00:00 2001 From: tankefugl Date: Sun, 27 Nov 2005 17:40:49 +0000 Subject: [PATCH] git-svn-id: https://unknownworlds.svn.cloudforge.com/ns1@366 67975925-1194-0748-b3d5-c16f83f1a3a1 --- dev/3.2-movements/source/dlls/player.cpp | 5 +++-- dev/3.2-movements/source/dlls/player.h | 2 ++ dev/3.2-movements/source/mod/AvHPlayer.cpp | 2 ++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/dev/3.2-movements/source/dlls/player.cpp b/dev/3.2-movements/source/dlls/player.cpp index 1f990b5..eb6761b 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 8024e97..42a321b 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 1f6d287..7c509a8 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]);