Skip to content

Commit aa6f516

Browse files
committed
Added "quickstand" to setGlitchEnabled
1 parent 245fccd commit aa6f516

File tree

10 files changed

+28
-5
lines changed

10 files changed

+28
-5
lines changed

MTA10/mods/deathmatch/logic/CClientGame.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ CClientGame::CClientGame ( bool bLocalPlay )
129129
m_Glitches [ GLITCH_HITANIM ] = false;
130130
m_Glitches [ GLITCH_FASTSPRINT ] = false;
131131
m_Glitches [ GLITCH_BADDRIVEBYHITBOX ] = false;
132+
m_Glitches [ GLITCH_QUICKSTAND ] = false;
132133
g_pMultiplayer->DisableBadDrivebyHitboxes( true );
133134

134135
// Remove Night & Thermal vision view (if enabled).

MTA10/mods/deathmatch/logic/CClientGame.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ class CClientGame
192192
GLITCH_HITANIM,
193193
GLITCH_FASTSPRINT,
194194
GLITCH_BADDRIVEBYHITBOX,
195+
GLITCH_QUICKSTAND,
195196
NUM_GLITCHES
196197
};
197198
class CStoredWeaponSlot

MTA10/mods/deathmatch/logic/CPacketHandler.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2240,6 +2240,7 @@ void CPacketHandler::Packet_MapInfo ( NetBitStreamInterface& bitStream )
22402240
g_pClientGame->SetGlitchEnabled ( CClientGame::GLITCH_HITANIM, funBugs.data2.bHitAnim );
22412241
g_pClientGame->SetGlitchEnabled ( CClientGame::GLITCH_FASTSPRINT, funBugs.data3.bFastSprint );
22422242
g_pClientGame->SetGlitchEnabled ( CClientGame::GLITCH_BADDRIVEBYHITBOX, funBugs.data4.bBadDrivebyHitboxes );
2243+
g_pClientGame->SetGlitchEnabled ( CClientGame::GLITCH_QUICKSTAND, funBugs.data5.bQuickStand );
22432244

22442245
float fJetpackMaxHeight = 100;
22452246
if ( !bitStream.Read ( fJetpackMaxHeight ) )

MTA10/mods/shared_logic/CClientPed.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3095,9 +3095,12 @@ void CClientPed::ApplyControllerStateFixes ( CControllerState& Current )
30953095
if ( ( ulNow - m_ulLastTimePressedLeftOrRight < 500.f * fSpeedRatio ) &&
30963096
( ulNow - m_ulLastTimeUseGunCrouched < 500.f * fSpeedRatio ) )
30973097
{
3098-
Current.ShockButtonL = 0;
3099-
Current.ButtonCross = 0;
3100-
Current.ButtonSquare = 0;
3098+
if ( !g_pClientGame->IsGlitchEnabled( CClientGame::GLITCH_QUICKSTAND ) )
3099+
{
3100+
Current.ShockButtonL = 0;
3101+
Current.ButtonCross = 0;
3102+
Current.ButtonSquare = 0;
3103+
}
31013104
}
31023105

31033106
}

MTA10/version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
#define _NETCODE_VERSION_BRANCH_ID 0x4 // Use 0x1 - 0xF to indicate an incompatible branch is being used (0x0 is reserved, 0x4 is trunk)
7878
#define _CLIENT_NET_MODULE_VERSION 0x08E // (0x000 - 0xfff) Lvl9 wizards only
7979
#define _NETCODE_VERSION 0x1D8 // (0x000 - 0xfff) Increment when net messages change (pre-release)
80-
#define MTA_DM_BITSTREAM_VERSION 0x060 // (0x000 - 0xfff) Increment when net messages change (post-release). (Changing will also require additional backward compatibility code).
80+
#define MTA_DM_BITSTREAM_VERSION 0x063 // (0x000 - 0xfff) Increment when net messages change (post-release). (Changing will also require additional backward compatibility code).
8181

8282
// To avoid user confusion, make sure the ASE version matches only if communication is possible
8383
#if defined(MTA_DM_CONNECT_TO_PUBLIC)

MTA10_Server/mods/deathmatch/logic/CGame.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ CGame::CGame ( void )
179179
m_Glitches [ GLITCH_HITANIM ] = false;
180180
m_Glitches [ GLITCH_FASTSPRINT ] = false;
181181
m_Glitches [ GLITCH_BADDRIVEBYHITBOX ] = false;
182+
m_Glitches [ GLITCH_QUICKSTAND ] = false;
182183
for ( int i = 0; i < WEAPONTYPE_LAST_WEAPONTYPE; i++ )
183184
m_JetpackWeapons [ i ] = false;
184185

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

198200
m_bCloudsEnabled = true;
199201

MTA10_Server/mods/deathmatch/logic/CGame.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ class CGame
197197
GLITCH_HITANIM,
198198
GLITCH_FASTSPRINT,
199199
GLITCH_BADDRIVEBYHITBOX,
200+
GLITCH_QUICKSTAND,
200201
NUM_GLITCHES
201202
};
202203
public:

MTA10_Server/mods/deathmatch/logic/packets/CMapInfoPacket.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ bool CMapInfoPacket::Write ( NetBitStreamInterface& BitStream ) const
202202
funBugs.data2.bHitAnim = g_pGame->IsGlitchEnabled ( CGame::GLITCH_HITANIM );
203203
funBugs.data3.bFastSprint = g_pGame->IsGlitchEnabled ( CGame::GLITCH_FASTSPRINT );
204204
funBugs.data4.bBadDrivebyHitboxes = g_pGame->IsGlitchEnabled( CGame::GLITCH_BADDRIVEBYHITBOX );
205+
funBugs.data5.bQuickStand = g_pGame->IsGlitchEnabled( CGame::GLITCH_QUICKSTAND );
205206
BitStream.Write ( &funBugs );
206207

207208
BitStream.Write ( m_fJetpackMaxHeight );

MTA10_Server/version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
#define _NETCODE_VERSION_BRANCH_ID 0x4 // Use 0x1 - 0xF to indicate an incompatible branch is being used (0x0 is reserved, 0x4 is trunk)
8181
#define _SERVER_NET_MODULE_VERSION 0x091 // (0x000 - 0xfff) Lvl9 wizards only
8282
#define _NETCODE_VERSION 0x1D8 // (0x000 - 0xfff) Increment when net messages change (pre-release)
83-
#define MTA_DM_BITSTREAM_VERSION 0x060 // (0x000 - 0xfff) Increment when net messages change (post-release). (Changing will also require additional backward compatibility code).
83+
#define MTA_DM_BITSTREAM_VERSION 0x063 // (0x000 - 0xfff) Increment when net messages change (post-release). (Changing will also require additional backward compatibility code).
8484

8585
// To avoid user confusion, make sure the ASE version matches only if communication is possible
8686
#if defined(MTA_DM_CONNECT_FROM_PUBLIC)

Shared/sdk/net/SyncStructures.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1918,6 +1918,7 @@ struct SFunBugsStateSync : public ISyncStructure
19181918
enum { BITCOUNT2 = 1 };
19191919
enum { BITCOUNT3 = 1 };
19201920
enum { BITCOUNT4 = 1 };
1921+
enum { BITCOUNT5 = 1 };
19211922

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

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

19561963
//// Example for adding item:
19571964
// if ( bitStream.Version() >= 0x999 )
@@ -1985,6 +1992,12 @@ struct SFunBugsStateSync : public ISyncStructure
19851992
{
19861993
bool bBadDrivebyHitboxes : 1;
19871994
} data4;
1995+
1996+
// Add new ones in separate structs
1997+
struct
1998+
{
1999+
bool bQuickStand : 1;
2000+
} data5;
19882001
};
19892002

19902003

0 commit comments

Comments
 (0)