Skip to content
Permalink
Browse files

Added "quickstand" to setGlitchEnabled

  • Loading branch information...
ccw808 committed Jul 13, 2015
1 parent 245fccd commit aa6f516a6f42b58984e883f6ba184d94910c7329
@@ -129,6 +129,7 @@ CClientGame::CClientGame ( bool bLocalPlay )
m_Glitches [ GLITCH_HITANIM ] = false;
m_Glitches [ GLITCH_FASTSPRINT ] = false;
m_Glitches [ GLITCH_BADDRIVEBYHITBOX ] = false;
m_Glitches [ GLITCH_QUICKSTAND ] = false;
g_pMultiplayer->DisableBadDrivebyHitboxes( true );

// Remove Night & Thermal vision view (if enabled).
@@ -192,6 +192,7 @@ class CClientGame
GLITCH_HITANIM,
GLITCH_FASTSPRINT,
GLITCH_BADDRIVEBYHITBOX,
GLITCH_QUICKSTAND,
NUM_GLITCHES
};
class CStoredWeaponSlot
@@ -2240,6 +2240,7 @@ void CPacketHandler::Packet_MapInfo ( NetBitStreamInterface& bitStream )
g_pClientGame->SetGlitchEnabled ( CClientGame::GLITCH_HITANIM, funBugs.data2.bHitAnim );
g_pClientGame->SetGlitchEnabled ( CClientGame::GLITCH_FASTSPRINT, funBugs.data3.bFastSprint );
g_pClientGame->SetGlitchEnabled ( CClientGame::GLITCH_BADDRIVEBYHITBOX, funBugs.data4.bBadDrivebyHitboxes );
g_pClientGame->SetGlitchEnabled ( CClientGame::GLITCH_QUICKSTAND, funBugs.data5.bQuickStand );

float fJetpackMaxHeight = 100;
if ( !bitStream.Read ( fJetpackMaxHeight ) )
@@ -3095,9 +3095,12 @@ void CClientPed::ApplyControllerStateFixes ( CControllerState& Current )
if ( ( ulNow - m_ulLastTimePressedLeftOrRight < 500.f * fSpeedRatio ) &&
( ulNow - m_ulLastTimeUseGunCrouched < 500.f * fSpeedRatio ) )
{
Current.ShockButtonL = 0;
Current.ButtonCross = 0;
Current.ButtonSquare = 0;
if ( !g_pClientGame->IsGlitchEnabled( CClientGame::GLITCH_QUICKSTAND ) )
{
Current.ShockButtonL = 0;
Current.ButtonCross = 0;
Current.ButtonSquare = 0;
}
}

}
@@ -77,7 +77,7 @@
#define _NETCODE_VERSION_BRANCH_ID 0x4 // Use 0x1 - 0xF to indicate an incompatible branch is being used (0x0 is reserved, 0x4 is trunk)
#define _CLIENT_NET_MODULE_VERSION 0x08E // (0x000 - 0xfff) Lvl9 wizards only
#define _NETCODE_VERSION 0x1D8 // (0x000 - 0xfff) Increment when net messages change (pre-release)
#define MTA_DM_BITSTREAM_VERSION 0x060 // (0x000 - 0xfff) Increment when net messages change (post-release). (Changing will also require additional backward compatibility code).
#define MTA_DM_BITSTREAM_VERSION 0x063 // (0x000 - 0xfff) Increment when net messages change (post-release). (Changing will also require additional backward compatibility code).

// To avoid user confusion, make sure the ASE version matches only if communication is possible
#if defined(MTA_DM_CONNECT_TO_PUBLIC)
@@ -179,6 +179,7 @@ CGame::CGame ( void )
m_Glitches [ GLITCH_HITANIM ] = false;
m_Glitches [ GLITCH_FASTSPRINT ] = false;
m_Glitches [ GLITCH_BADDRIVEBYHITBOX ] = false;
m_Glitches [ GLITCH_QUICKSTAND ] = false;
for ( int i = 0; i < WEAPONTYPE_LAST_WEAPONTYPE; i++ )
m_JetpackWeapons [ i ] = false;

@@ -194,6 +195,7 @@ CGame::CGame ( void )
m_GlitchNames["hitanim"] = GLITCH_HITANIM;
m_GlitchNames["fastsprint"] = GLITCH_FASTSPRINT;
m_GlitchNames["baddrivebyhitbox"] = GLITCH_BADDRIVEBYHITBOX;
m_GlitchNames["quickstand"] = GLITCH_QUICKSTAND;

m_bCloudsEnabled = true;

@@ -197,6 +197,7 @@ class CGame
GLITCH_HITANIM,
GLITCH_FASTSPRINT,
GLITCH_BADDRIVEBYHITBOX,
GLITCH_QUICKSTAND,
NUM_GLITCHES
};
public:
@@ -202,6 +202,7 @@ bool CMapInfoPacket::Write ( NetBitStreamInterface& BitStream ) const
funBugs.data2.bHitAnim = g_pGame->IsGlitchEnabled ( CGame::GLITCH_HITANIM );
funBugs.data3.bFastSprint = g_pGame->IsGlitchEnabled ( CGame::GLITCH_FASTSPRINT );
funBugs.data4.bBadDrivebyHitboxes = g_pGame->IsGlitchEnabled( CGame::GLITCH_BADDRIVEBYHITBOX );
funBugs.data5.bQuickStand = g_pGame->IsGlitchEnabled( CGame::GLITCH_QUICKSTAND );
BitStream.Write ( &funBugs );

BitStream.Write ( m_fJetpackMaxHeight );
@@ -80,7 +80,7 @@
#define _NETCODE_VERSION_BRANCH_ID 0x4 // Use 0x1 - 0xF to indicate an incompatible branch is being used (0x0 is reserved, 0x4 is trunk)
#define _SERVER_NET_MODULE_VERSION 0x091 // (0x000 - 0xfff) Lvl9 wizards only
#define _NETCODE_VERSION 0x1D8 // (0x000 - 0xfff) Increment when net messages change (pre-release)
#define MTA_DM_BITSTREAM_VERSION 0x060 // (0x000 - 0xfff) Increment when net messages change (post-release). (Changing will also require additional backward compatibility code).
#define MTA_DM_BITSTREAM_VERSION 0x063 // (0x000 - 0xfff) Increment when net messages change (post-release). (Changing will also require additional backward compatibility code).

// To avoid user confusion, make sure the ASE version matches only if communication is possible
#if defined(MTA_DM_CONNECT_FROM_PUBLIC)
@@ -1918,6 +1918,7 @@ struct SFunBugsStateSync : public ISyncStructure
enum { BITCOUNT2 = 1 };
enum { BITCOUNT3 = 1 };
enum { BITCOUNT4 = 1 };
enum { BITCOUNT5 = 1 };

bool Read ( NetBitStreamInterface& bitStream )
{
@@ -1934,6 +1935,10 @@ struct SFunBugsStateSync : public ISyncStructure
bOk &= bitStream.ReadBits(reinterpret_cast < char* > (&data4), BITCOUNT4);
else
data4.bBadDrivebyHitboxes = 0;
if ( bitStream.Version() >= 0x063 )
bOk &= bitStream.ReadBits( reinterpret_cast < char* > ( &data5 ), BITCOUNT5 );
else
data5.bQuickStand = 0;

//// Example for adding item:
// if ( bitStream.Version() >= 0x999 )
@@ -1952,6 +1957,8 @@ struct SFunBugsStateSync : public ISyncStructure
bitStream.WriteBits ( reinterpret_cast < const char* > ( &data3 ), BITCOUNT3 );
if (bitStream.Version() >= 0x059)
bitStream.WriteBits(reinterpret_cast < const char* > (&data4), BITCOUNT4);
if ( bitStream.Version() >= 0x063 )
bitStream.WriteBits( reinterpret_cast < const char* > ( &data5 ), BITCOUNT5 );

//// Example for adding item:
// if ( bitStream.Version() >= 0x999 )
@@ -1985,6 +1992,12 @@ struct SFunBugsStateSync : public ISyncStructure
{
bool bBadDrivebyHitboxes : 1;
} data4;

// Add new ones in separate structs
struct
{
bool bQuickStand : 1;
} data5;
};


1 comment on commit aa6f516

@asturel

This comment has been minimized.

Copy link

asturel commented on aa6f516 Jul 15, 2015

Is this that 'bug' what I told you?

Please sign in to comment.
You can’t perform that action at this time.