mirror of
https://github.com/ENSL/NS.git
synced 2025-03-13 06:03:04 +00:00
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:
parent
db2fff5fa8
commit
61685b7593
2 changed files with 7 additions and 10 deletions
|
@ -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->iEnabled = (iState & WEAPON_IS_ENABLED) != 0 ? TRUE : FALSE;
|
||||||
pWeapon->iClip = abs(iClip);
|
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 )
|
if( !bIsCurrent )
|
||||||
{ return 1; }
|
{ 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;
|
m_pWeapon = pWeapon;
|
||||||
|
|
||||||
if ( !(gHUD.m_iHideHUDDisplay & ( HIDEHUD_WEAPONS | HIDEHUD_ALL )) )
|
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
|
// puzl: 497 - default value for enable state
|
||||||
Weapon.iEnabled = 0;
|
Weapon.iEnabled = 0;
|
||||||
|
|
||||||
// if (Weapon.iId == 22 || Weapon.iId == 11 || Weapon.iId == 21)
|
|
||||||
// gCanMove = true; //Weapon.iEnabled;
|
|
||||||
|
|
||||||
gWR.AddWeapon( &Weapon );
|
gWR.AddWeapon( &Weapon );
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -546,6 +546,7 @@ void CBasePlayerWeapon::ItemPostFrame( void )
|
||||||
// +movement: Rewritten to allow us to use +attack2 for movement abilities
|
// +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()))
|
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
|
// Find out what kind of special movement we are using, and execute the animation for it
|
||||||
if (this->PrevAttack2Status == false)
|
if (this->PrevAttack2Status == false)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue