From 61685b7593af1dfae6193671544b530e32cf886d Mon Sep 17 00:00:00 2001 From: tankefugl Date: Mon, 26 Jun 2006 09:09:17 +0000 Subject: [PATCH] o Fixed bug where the usage of movement abilities would become out of sync on server and client, causing "teleports" and stuttering. git-svn-id: https://unknownworlds.svn.cloudforge.com/ns1@542 67975925-1194-0748-b3d5-c16f83f1a3a1 --- releases/3.2.0/source/cl_dll/ammo.cpp | 16 ++++++---------- releases/3.2.0/source/cl_dll/hl/hl_weapons.cpp | 1 + 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/releases/3.2.0/source/cl_dll/ammo.cpp b/releases/3.2.0/source/cl_dll/ammo.cpp index abf300a3..97822408 100644 --- a/releases/3.2.0/source/cl_dll/ammo.cpp +++ b/releases/3.2.0/source/cl_dll/ammo.cpp @@ -829,16 +829,15 @@ int CHudAmmo::MsgFunc_CurWeapon(const char *pszName, int iSize, void *pbuf ) pWeapon->iEnabled = (iState & WEAPON_IS_ENABLED) != 0 ? TRUE : FALSE; pWeapon->iClip = abs(iClip); + // Ensure that movement is enabled/disabled according to weapons + if (iId == 22 || iId == 11 || iId == 21) + { + gCanMove = pWeapon->iEnabled; + } + if( !bIsCurrent ) { return 1; } -// char temp[255]; -// sprintf(temp, "iState %d iId %d iClip %d\n", iState, iId, iClip); -// gEngfuncs.pfnConsolePrint(temp); - - if (iId == 22 || iId == 11 || iId == 21) - gCanMove = pWeapon->iEnabled; - m_pWeapon = pWeapon; if ( !(gHUD.m_iHideHUDDisplay & ( HIDEHUD_WEAPONS | HIDEHUD_ALL )) ) @@ -891,9 +890,6 @@ int CHudAmmo::MsgFunc_WeaponList(const char *pszName, int iSize, void *pbuf ) // puzl: 497 - default value for enable state Weapon.iEnabled = 0; -// if (Weapon.iId == 22 || Weapon.iId == 11 || Weapon.iId == 21) -// gCanMove = true; //Weapon.iEnabled; - gWR.AddWeapon( &Weapon ); return 1; } diff --git a/releases/3.2.0/source/cl_dll/hl/hl_weapons.cpp b/releases/3.2.0/source/cl_dll/hl/hl_weapons.cpp index 96f34185..a1f0002c 100644 --- a/releases/3.2.0/source/cl_dll/hl/hl_weapons.cpp +++ b/releases/3.2.0/source/cl_dll/hl/hl_weapons.cpp @@ -546,6 +546,7 @@ void CBasePlayerWeapon::ItemPostFrame( void ) // +movement: Rewritten to allow us to use +attack2 for movement abilities else if ((m_pPlayer->pev->button & IN_ATTACK2) && (m_flNextPrimaryAttack <= 0.0) && (gHUD.GetIsAlien())) { + //m_flNextSecondaryAttack // Find out what kind of special movement we are using, and execute the animation for it if (this->PrevAttack2Status == false) {