Skip to content

Commit 2507894

Browse files
Synchronize changes from 1.6 master branch [ci skip]
47bc53f Remove outdated bitstream checks d302d3c Remove outdated community account handling fe761e5 Remove unused jump section in HOOK_CPlantMgr_Render 3707b53 Disable empty CResourceChecker data arrays 859e6ce Remove outdated bitstream checks 25e07c4 Remove remaining minimum client checks 764f5ab Set version to 1.6.1 a79a764 Update client en_US pot
2 parents 873ed79 + 47bc53f commit 2507894

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+752
-2134
lines changed

Client/launch/Multi Theft Auto.manifest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
22
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:v3="urn:schemas-microsoft-com:asm.v3">
3-
<assemblyIdentity type="win32" version="1.6.0.0" processorArchitecture="*" name="Multi Theft Auto" />
3+
<assemblyIdentity type="win32" version="1.6.1.0" processorArchitecture="*" name="Multi Theft Auto" />
44

55
<v3:application>
66
<windowsSettings>

Client/launch/NEU/.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.xml diff working-tree-encoding=UTF-16 eol=crlf
-3.83 KB
Binary file not shown.

Client/launch/launch.rc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ IDI_ICON1 ICON "resource\\mtaicon.ico"
7171
//
7272

7373
VS_VERSION_INFO VERSIONINFO
74-
FILEVERSION 1,6,0,0
75-
PRODUCTVERSION 1,6,0,0
74+
FILEVERSION 1,6,1,0
75+
PRODUCTVERSION 1,6,1,0
7676
FILEFLAGSMASK 0x17L
7777
#ifdef _DEBUG
7878
FILEFLAGS 0x1L
@@ -89,10 +89,10 @@ BEGIN
8989
BEGIN
9090
VALUE "CompanyName", "Multi Theft Auto"
9191
VALUE "FileDescription", "Multi Theft Auto Launcher"
92-
VALUE "FileVersion", "1.6.0.0"
93-
VALUE "LegalCopyright", "(C) 2003 - 2023 Multi Theft Auto"
92+
VALUE "FileVersion", "1.6.1.0"
93+
VALUE "LegalCopyright", "(C) 2003 - 2025 Multi Theft Auto"
9494
VALUE "ProductName", "MTA San Andreas"
95-
VALUE "ProductVersion", "1.6.0.0"
95+
VALUE "ProductVersion", "1.6.1.0"
9696
END
9797
END
9898
BLOCK "VarFileInfo"

Client/mods/deathmatch/logic/CClientGame.cpp

Lines changed: 9 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -703,16 +703,6 @@ bool CClientGame::StartGame(const char* szNick, const char* szPassword, eServerT
703703
pBitStream->Write(strTemp.c_str(), MAX_PLAYER_NICK_LENGTH);
704704
pBitStream->Write(reinterpret_cast<const char*>(Password.data), sizeof(MD5));
705705

706-
// Append community information (Removed)
707-
std::string strUser;
708-
pBitStream->Write(strUser.c_str(), MAX_SERIAL_LENGTH);
709-
710-
// Send an empty string if server still has old Discord implementation (#2499)
711-
if (g_pNet->CanServerBitStream(eBitStreamVersion::Discord_InitialImplementation) && !g_pNet->CanServerBitStream(eBitStreamVersion::Discord_Cleanup))
712-
{
713-
pBitStream->WriteString<uchar>("");
714-
}
715-
716706
// Send the packet as joindata
717707
g_pNet->SendPacket(PACKET_ID_PLAYER_JOINDATA, pBitStream, PACKET_PRIORITY_HIGH, PACKET_RELIABILITY_RELIABLE_ORDERED);
718708
g_pNet->DeallocateNetBitStream(pBitStream);
@@ -1829,12 +1819,10 @@ void CClientGame::UpdatePlayerWeapons()
18291819
SWeaponSlotSync slot;
18301820

18311821
// Always send bit in case server is not in sync
1832-
if ((BitStream.Version() >= 0x44 && m_lastWeaponSlot == WEAPONSLOT_TYPE_THROWN) || BitStream.Version() >= 0x4D)
18331822
{
18341823
CWeapon* pLastWeapon = m_pLocalPlayer->GetWeapon(m_lastWeaponSlot);
18351824
if (pLastWeapon && pLastWeapon->GetAmmoTotal() == 0 &&
1836-
(m_lastWeaponSlot == WEAPONSLOT_TYPE_THROWN ||
1837-
(BitStream.Version() >= 0x5A && (m_lastWeaponSlot == WEAPONSLOT_TYPE_HEAVY || m_lastWeaponSlot == WEAPONSLOT_TYPE_SPECIAL))))
1825+
(m_lastWeaponSlot == WEAPONSLOT_TYPE_THROWN || m_lastWeaponSlot == WEAPONSLOT_TYPE_HEAVY || m_lastWeaponSlot == WEAPONSLOT_TYPE_SPECIAL))
18381826
BitStream.WriteBit(true);
18391827
else
18401828
BitStream.WriteBit(false);
@@ -5281,18 +5269,15 @@ void CClientGame::SendExplosionSync(const CVector& vecPosition, eExplosionType T
52815269

52825270
// Because we use this packet to notify the server of blown vehicles,
52835271
// we include a bit, whether the vehicle was blown without an explosion
5284-
if (pBitStream->Can(eBitStreamVersion::VehicleBlowStateSupport))
5272+
if (pOrigin->GetType() == CCLIENTVEHICLE)
52855273
{
5286-
if (pOrigin->GetType() == CCLIENTVEHICLE)
5287-
{
5288-
auto vehicle = reinterpret_cast<CClientVehicle*>(pOrigin);
5289-
pBitStream->WriteBit(1);
5290-
pBitStream->WriteBit(vehicleBlowState.value_or(vehicle->GetBlowState()) == VehicleBlowState::BLOWN);
5291-
}
5292-
else
5293-
{
5294-
pBitStream->WriteBit(0);
5295-
}
5274+
auto vehicle = reinterpret_cast<CClientVehicle*>(pOrigin);
5275+
pBitStream->WriteBit(1);
5276+
pBitStream->WriteBit(vehicleBlowState.value_or(vehicle->GetBlowState()) == VehicleBlowState::BLOWN);
5277+
}
5278+
else
5279+
{
5280+
pBitStream->WriteBit(0);
52965281
}
52975282

52985283
// Convert position

Client/mods/deathmatch/logic/CClientPed.cpp

Lines changed: 6 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -6477,12 +6477,6 @@ bool CClientPed::EnterVehicle(CClientVehicle* pVehicle, bool bPassenger)
64776477
return false;
64786478
}
64796479

6480-
// Check the server is compatible if we are a ped
6481-
if (!IsLocalPlayer() && !g_pNet->CanServerBitStream(eBitStreamVersion::PedEnterExit))
6482-
{
6483-
return false;
6484-
}
6485-
64866480
// Are we already inside a vehicle
64876481
if (GetOccupiedVehicle())
64886482
{
@@ -6651,11 +6645,7 @@ bool CClientPed::EnterVehicle(CClientVehicle* pVehicle, bool bPassenger)
66516645
return false;
66526646
}
66536647

6654-
// Write the ped ID to it if server supports it
6655-
if (g_pNet->CanServerBitStream(eBitStreamVersion::PedEnterExit))
6656-
{
6657-
pBitStream->Write(GetID());
6658-
}
6648+
pBitStream->Write(GetID());
66596649

66606650
// Write the vehicle id to it and that we're requesting to get into it
66616651
pBitStream->Write(pVehicle->GetID());
@@ -6718,12 +6708,6 @@ bool CClientPed::ExitVehicle()
67186708
return false;
67196709
}
67206710

6721-
// Check the server is compatible if we are a ped
6722-
if (!IsLocalPlayer() && !g_pNet->CanServerBitStream(eBitStreamVersion::PedEnterExit))
6723-
{
6724-
return false;
6725-
}
6726-
67276711
// Are we already sending an in/out request or not allowed to create a new in/out?
67286712
if (m_bNoNewVehicleTask // Are we permitted to even enter a vehicle?
67296713
|| m_VehicleInOutID != INVALID_ELEMENT_ID // Make sure we're not already processing a vehicle enter (would refer to valid ID if we were)
@@ -6784,11 +6768,7 @@ bool CClientPed::ExitVehicle()
67846768
return false;
67856769
}
67866770

6787-
// Write the ped ID to it if server supports it
6788-
if (g_pNet->CanServerBitStream(eBitStreamVersion::PedEnterExit))
6789-
{
6790-
pBitStream->Write(GetID());
6791-
}
6771+
pBitStream->Write(GetID());
67926772

67936773
// Write the vehicle id to it and that we're requesting to get out of it
67946774
pBitStream->Write(pOccupiedVehicle->GetID());
@@ -6916,10 +6896,7 @@ void CClientPed::UpdateVehicleInOut()
69166896
if (pBitStream)
69176897
{
69186898
// Write the ped ID to it
6919-
if (g_pNet->CanServerBitStream(eBitStreamVersion::PedEnterExit))
6920-
{
6921-
pBitStream->Write(GetID());
6922-
}
6899+
pBitStream->Write(GetID());
69236900

69246901
// Write the car id and the action id (enter complete)
69256902
pBitStream->Write(m_VehicleInOutID);
@@ -6969,10 +6946,7 @@ void CClientPed::UpdateVehicleInOut()
69696946
if (pBitStream)
69706947
{
69716948
// Write the ped or player ID to it
6972-
if (g_pNet->CanServerBitStream(eBitStreamVersion::PedEnterExit))
6973-
{
6974-
pBitStream->Write(GetID());
6975-
}
6949+
pBitStream->Write(GetID());
69766950

69776951
// Write the car id and the action id (enter complete)
69786952
pBitStream->Write(m_VehicleInOutID);
@@ -7016,10 +6990,7 @@ void CClientPed::UpdateVehicleInOut()
70166990
if (pBitStream)
70176991
{
70186992
// Write the ped or player ID to it
7019-
if (g_pNet->CanServerBitStream(eBitStreamVersion::PedEnterExit))
7020-
{
7021-
pBitStream->Write(GetID());
7022-
}
6993+
pBitStream->Write(GetID());
70236994

70246995
// Write the car id and the action id (enter complete)
70256996
pBitStream->Write(m_VehicleInOutID);
@@ -7131,10 +7102,7 @@ void CClientPed::UpdateVehicleInOut()
71317102
return;
71327103

71337104
// Write the ped or player ID to it
7134-
if (g_pNet->CanServerBitStream(eBitStreamVersion::PedEnterExit))
7135-
{
7136-
pBitStream->Write(GetID());
7137-
}
7105+
pBitStream->Write(GetID());
71387106

71397107
// Vehicle id
71407108
pBitStream->Write(pOccupiedVehicle->GetID());

Client/mods/deathmatch/logic/CNetAPI.cpp

Lines changed: 17 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1118,9 +1118,7 @@ void CNetAPI::WritePlayerPuresync(CClientPlayer* pPlayerModel, NetBitStreamInter
11181118
flags.data.bHasAWeapon = (pPlayerWeapon != NULL);
11191119
flags.data.bSyncingVelocity = (!flags.data.bIsOnGround || (pPlayerModel->GetPlayerSyncCount() % 4) == 0);
11201120
flags.data.bStealthAiming = (pPlayerModel->IsStealthAiming() == true);
1121-
1122-
if (BitStream.Can(eBitStreamVersion::IsPedReloadingWeapon))
1123-
flags.data2.isReloadingWeapon = (pPlayerModel->IsReloadingWeapon() == true);
1121+
flags.data.isReloadingWeapon = (pPlayerModel->IsReloadingWeapon() == true);
11241122

11251123
if (pPlayerWeapon->GetSlot() > 15)
11261124
flags.data.bHasAWeapon = false;
@@ -1289,9 +1287,7 @@ void CNetAPI::ReadVehiclePuresync(CClientPlayer* pPlayer, CClientVehicle* pVehic
12891287
// differs from the local one (#8800)
12901288
int iModelID = pVehicle->GetModel();
12911289
int iRemoteModelID = iModelID;
1292-
1293-
if (BitStream.Version() >= 0x05F)
1294-
BitStream.Read(iRemoteModelID);
1290+
BitStream.Read(iRemoteModelID);
12951291

12961292
eClientVehicleType remoteVehicleType = CClientVehicleManager::GetVehicleType(iRemoteModelID);
12971293
eClientVehicleType vehicleType = pVehicle->GetVehicleType();
@@ -1480,7 +1476,7 @@ void CNetAPI::ReadVehiclePuresync(CClientPlayer* pPlayer, CClientVehicle* pVehic
14801476
}
14811477

14821478
// Read out the weapon ammo
1483-
SWeaponAmmoSync ammo(ucCurrentWeapon, BitStream.Version() >= 0x44, true);
1479+
SWeaponAmmoSync ammo(ucCurrentWeapon, true, true);
14841480
BitStream.Read(&ammo);
14851481
unsigned short usWeaponAmmo = ammo.data.usAmmoInClip;
14861482

@@ -1489,7 +1485,7 @@ void CNetAPI::ReadVehiclePuresync(CClientPlayer* pPlayer, CClientVehicle* pVehic
14891485
CWeapon* pPlayerWeapon = pPlayer->GiveWeapon(static_cast<eWeaponType>(ucCurrentWeapon), usWeaponAmmo, true);
14901486
if (pPlayerWeapon)
14911487
{
1492-
pPlayerWeapon->SetAmmoTotal(BitStream.Version() >= 0x44 ? ammo.data.usTotalAmmo : 9999);
1488+
pPlayerWeapon->SetAmmoTotal(ammo.data.usTotalAmmo);
14931489
pPlayerWeapon->SetAmmoInClip(usWeaponAmmo);
14941490
}
14951491
}
@@ -1545,8 +1541,7 @@ void CNetAPI::ReadVehiclePuresync(CClientPlayer* pPlayer, CClientVehicle* pVehic
15451541

15461542
pPlayer->SetControllerState(ControllerState);
15471543

1548-
if (BitStream.Can(eBitStreamVersion::SetElementOnFire))
1549-
pVehicle->SetOnFire(BitStream.ReadBit());
1544+
pVehicle->SetOnFire(BitStream.ReadBit());
15501545

15511546
// Remember now as the last puresync time
15521547
CVector vecPosition;
@@ -1574,8 +1569,7 @@ void CNetAPI::WriteVehiclePuresync(CClientPed* pPlayerModel, CClientVehicle* pVe
15741569
iModelID = pVehicle->GetModelInfo()->GetParentID();
15751570

15761571
// Write the clientside model
1577-
if (BitStream.Version() >= 0x05F)
1578-
BitStream.Write(iModelID);
1572+
BitStream.Write(iModelID);
15791573

15801574
// Grab the vehicle position
15811575
CVector vecPosition;
@@ -1667,38 +1661,6 @@ void CNetAPI::WriteVehiclePuresync(CClientPed* pPlayerModel, CClientVehicle* pVe
16671661
BitStream.WriteBit(false);
16681662
}
16691663

1670-
// Update Damage Info if changed
1671-
if (BitStream.Version() >= 0x047)
1672-
{
1673-
if (!g_pClientGame->GetDamageSent())
1674-
{
1675-
g_pClientGame->SetDamageSent(true);
1676-
1677-
ElementID DamagerID = g_pClientGame->GetDamagerID();
1678-
if (DamagerID != RESERVED_ELEMENT_ID)
1679-
{
1680-
BitStream.WriteBit(true);
1681-
BitStream.Write(DamagerID);
1682-
1683-
SWeaponTypeSync weaponType;
1684-
weaponType.data.ucWeaponType = g_pClientGame->GetDamageWeapon();
1685-
BitStream.Write(&weaponType);
1686-
1687-
SBodypartSync bodypart;
1688-
bodypart.data.uiBodypart = g_pClientGame->GetDamageBodyPiece();
1689-
BitStream.Write(&bodypart);
1690-
}
1691-
else
1692-
{
1693-
BitStream.WriteBit(false);
1694-
}
1695-
}
1696-
else
1697-
{
1698-
BitStream.WriteBit(false);
1699-
}
1700-
}
1701-
17021664
// Player health sync (scaled from 0.0f-200.0f to 0-255 to save three bytes).
17031665
// Scale goes up to 200.0f because having max stats gives you the double of health.
17041666
SPlayerHealthSync health;
@@ -1741,7 +1703,7 @@ void CNetAPI::WriteVehiclePuresync(CClientPed* pPlayerModel, CClientVehicle* pVe
17411703
if (flags.data.bIsDoingGangDriveby && CWeaponNames::DoesSlotHaveAmmo(uiSlot))
17421704
{
17431705
// Write the ammo states
1744-
SWeaponAmmoSync ammo(pPlayerWeapon->GetType(), BitStream.Version() >= 0x44, true);
1706+
SWeaponAmmoSync ammo(pPlayerWeapon->GetType(), true, true);
17451707
ammo.data.usAmmoInClip = static_cast<unsigned short>(pPlayerWeapon->GetAmmoInClip());
17461708
ammo.data.usTotalAmmo = static_cast<unsigned short>(pPlayerWeapon->GetAmmoTotal());
17471709
BitStream.Write(&ammo);
@@ -1773,8 +1735,7 @@ void CNetAPI::WriteVehiclePuresync(CClientPed* pPlayerModel, CClientVehicle* pVe
17731735
BitStream.WriteBit(ControllerState.RightShoulder2 != 0);
17741736
}
17751737

1776-
if (BitStream.Can(eBitStreamVersion::SetElementOnFire))
1777-
BitStream.WriteBit(pVehicle->IsOnFire());
1738+
BitStream.WriteBit(pVehicle->IsOnFire());
17781739

17791740
// Write the sent position to the interpolator
17801741
AddInterpolation(vecPosition);
@@ -1786,19 +1747,19 @@ bool CNetAPI::ReadSmallKeysync(CControllerState& ControllerState, NetBitStreamIn
17861747
if (!BitStream.Read(&keys))
17871748
return false;
17881749

1789-
// Put the result into the controllerstate
1790-
ControllerState.LeftShoulder1 = 255 * keys.data.bLeftShoulder1;
1791-
ControllerState.RightShoulder1 = 255 * keys.data.bRightShoulder1;
17921750
short sButtonSquare = 255 * keys.data.bButtonSquare;
17931751
short sButtonCross = 255 * keys.data.bButtonCross;
1794-
if (BitStream.Can(eBitStreamVersion::AnalogControlSync_AccelBrakeReverse))
17951752
{
17961753
if (keys.data.ucButtonSquare != 0)
17971754
sButtonSquare = (short)keys.data.ucButtonSquare; // override controller state with analog data if present
17981755

17991756
if (keys.data.ucButtonCross != 0)
18001757
sButtonCross = (short)keys.data.ucButtonCross; // override controller state with analog data if present
18011758
}
1759+
1760+
// Put the result into the controllerstate
1761+
ControllerState.LeftShoulder1 = 255 * keys.data.bLeftShoulder1;
1762+
ControllerState.RightShoulder1 = 255 * keys.data.bRightShoulder1;
18021763
ControllerState.ButtonSquare = sButtonSquare;
18031764
ControllerState.ButtonCross = sButtonCross;
18041765
ControllerState.ButtonCircle = 255 * keys.data.bButtonCircle;
@@ -1837,19 +1798,19 @@ bool CNetAPI::ReadFullKeysync(CControllerState& ControllerState, NetBitStreamInt
18371798
if (!BitStream.Read(&keys))
18381799
return false;
18391800

1840-
// Put the result into the controllerstate
1841-
ControllerState.LeftShoulder1 = 255 * keys.data.bLeftShoulder1;
1842-
ControllerState.RightShoulder1 = 255 * keys.data.bRightShoulder1;
18431801
short sButtonSquare = 255 * keys.data.bButtonSquare;
18441802
short sButtonCross = 255 * keys.data.bButtonCross;
1845-
if (BitStream.Can(eBitStreamVersion::AnalogControlSync_AccelBrakeReverse))
18461803
{
18471804
if (keys.data.ucButtonSquare != 0)
18481805
sButtonSquare = (short)keys.data.ucButtonSquare; // override controller state with analog data if present
18491806

18501807
if (keys.data.ucButtonCross != 0)
18511808
sButtonCross = (short)keys.data.ucButtonCross; // override controller state with analog data if present
18521809
}
1810+
1811+
// Put the result into the controllerstate
1812+
ControllerState.LeftShoulder1 = 255 * keys.data.bLeftShoulder1;
1813+
ControllerState.RightShoulder1 = 255 * keys.data.bRightShoulder1;
18531814
ControllerState.ButtonSquare = sButtonSquare;
18541815
ControllerState.ButtonCross = sButtonCross;
18551816
ControllerState.ButtonCircle = 255 * keys.data.bButtonCircle;
@@ -1988,8 +1949,7 @@ void CNetAPI::WriteCameraSync(NetBitStreamInterface& BitStream)
19881949
{
19891950
CClientCamera* pCamera = m_pManager->GetCamera();
19901951

1991-
if (BitStream.Version() >= 0x05E)
1992-
BitStream.Write(pCamera->GetSyncTimeContext());
1952+
BitStream.Write(pCamera->GetSyncTimeContext());
19931953

19941954
// Are we in fixed mode?
19951955
bool bFixed = pCamera->IsInFixedMode();
@@ -2239,9 +2199,6 @@ void CNetAPI::ReadVehicleResync(CClientVehicle* pVehicle, NetBitStreamInterface&
22392199

22402200
void CNetAPI::ReadVehiclePartsState(CClientVehicle* pVehicle, NetBitStreamInterface& BitStream)
22412201
{
2242-
if (BitStream.Version() < 0x5D)
2243-
return;
2244-
22452202
SVehicleDamageSyncMethodeB damage;
22462203
BitStream.Read(&damage);
22472204
bool flyingComponents = m_pVehicleManager->IsSpawnFlyingComponentEnabled();

0 commit comments

Comments
 (0)