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
This commit is contained in:
tankefugl 2006-06-26 09:09:17 +00:00
parent db2fff5fa8
commit 61685b7593
2 changed files with 7 additions and 10 deletions

View file

@ -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;
}

View file

@ -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)
{