Skip to content

Commit 2530480

Browse files
committed
1.6: Reverted all backport related commits to diagnose something
1 parent f147dea commit 2530480

File tree

1,039 files changed

+26542
-73071
lines changed

Some content is hidden

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

1,039 files changed

+26542
-73071
lines changed

Client/core/CCommandFuncs.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -318,10 +318,6 @@ void CCommandFuncs::Reconnect(const char* szParameters)
318318
// Start the connect
319319
if (CCore::GetSingleton().GetConnectManager()->Reconnect(strHost.c_str(), usPort, strPassword.c_str(), false))
320320
{
321-
if (CCore::GetSingleton().GetConnectManager()->WasQuickConnect())
322-
{
323-
CCore::GetSingleton().GetConnectManager()->SetQuickConnect(false);
324-
}
325321
CCore::GetSingleton().GetConsole()->Printf(_("reconnect: Reconnecting to %s:%u..."), strHost.c_str(), usPort);
326322
}
327323
else

Client/core/CConnectManager.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,10 @@ class CConnectManager
2626

2727
bool Abort();
2828

29-
bool WasQuickConnect() const noexcept { return m_quickConnect; }
30-
3129
void DoPulse();
3230

3331
void OnServerExists();
3432

35-
void SetQuickConnect(bool quick) noexcept { m_quickConnect = quick; }
36-
3733
static void OpenServerFirewall(in_addr Address, ushort usHttpPort = 80, bool bHighPriority = false);
3834

3935
static bool StaticProcessPacket(unsigned char ucPacketID, class NetBitStreamInterface& bitStream);
@@ -63,5 +59,4 @@ class CConnectManager
6359
bool m_bNotifyServerBrowser;
6460

6561
bool CheckNickProvided(const char* szNick);
66-
bool m_quickConnect{false};
6762
};

Client/core/CMainMenu.cpp

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -850,9 +850,6 @@ bool CMainMenu::OnMenuClick(CGUIMouseEventArgs Args)
850850
}
851851

852852
break;
853-
case MENU_ITEM_QUICK_CONNECT:
854-
AskUserIfHeWantsToDisconnect(m_pHoveredItem->menuType);
855-
return true;
856853
default:
857854
break;
858855
}
@@ -917,8 +914,7 @@ bool CMainMenu::OnQuickConnectButtonClick(CGUIElement* pElement, bool left)
917914
ShowNetworkNotReadyWindow();
918915
return true;
919916
}
920-
921-
g_pCore->GetConnectManager()->SetQuickConnect(true);
917+
922918
g_pCore->GetCommands()->Execute("reconnect", "");
923919
}
924920
else
@@ -1266,9 +1262,6 @@ void CMainMenu::WantsToDisconnectCallBack(void* pData, uint uiButton)
12661262
case MENU_ITEM_DISCONNECT:
12671263
OnDisconnectButtonClick();
12681264
break;
1269-
case MENU_ITEM_QUICK_CONNECT:
1270-
OnQuickConnectButtonClick(nullptr, true);
1271-
break;
12721265
default:
12731266
break;
12741267
}

Client/core/DXHook/CProxyDirect3DDevice9.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ ULONG CProxyDirect3DDevice9::Release()
117117
// Call event handler
118118
CDirect3DEvents9::OnDirect3DDeviceDestroy(m_pDevice);
119119
delete this;
120-
return ulRefCount - 1;
121120
}
122121

123122
return m_pDevice->Release();

Client/game_sa/CPoolsSA.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
#include "CWorldSA.h"
2727

2828
#include "enums/VehicleClass.h"
29-
#include <new>
3029

3130
extern CGameSA* pGame;
3231

@@ -243,7 +242,7 @@ CObject* CPoolsSA::AddObject(CClientObject* pClientObject, DWORD dwModelID, bool
243242

244243
if (m_objectPool.ulCount < MAX_OBJECTS)
245244
{
246-
pObject = new (std::nothrow) CObjectSA(dwModelID, bBreakingDisabled);
245+
pObject = new CObjectSA(dwModelID, bBreakingDisabled);
247246

248247
if (pObject && AddObjectToPool(pClientObject, pObject))
249248
{

Client/game_sa/CRenderWareSA.cpp

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -285,18 +285,7 @@ RpClump* CRenderWareSA::ReadDFF(const SString& strFilename, const SString& buffe
285285

286286
// rockstar's collision hack: set the global particle emitter to the modelinfo pointer of this model
287287
if (bLoadEmbeddedCollisions)
288-
{
289-
// Vehicles have their collision loaded through the CollisionModel plugin, so we need to remove the current collision to prevent a memory leak.
290-
// This needs to be done here before reading the stream data, because plugins are read in RpClumpStreamRead.
291-
CModelInfo* modelInfo = pGame->GetModelInfo(usModelID);
292-
if (modelInfo)
293-
{
294-
if (auto* modelInfoInterface = modelInfo->GetInterface())
295-
((void(__thiscall*)(CBaseModelInfoSAInterface*))0x4C4C40)(modelInfoInterface); // CBaseModelInfo::DeleteCollisionModel
296-
}
297-
298288
RpPrtStdGlobalDataSetStreamEmbedded((void*)pPool[usModelID]);
299-
}
300289

301290
// read the clump with all its extensions
302291
RpClump* pClump = RpClumpStreamRead(streamModel);

Client/mods/deathmatch/logic/CClientEntity.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -791,8 +791,7 @@ void CClientEntity::CallEventNoParent(const char* szName, const CLuaArguments& A
791791
// Call it on all our children
792792
if (!m_Children.empty())
793793
{
794-
CElementListSnapshotRef pChildrenSnapshot = GetChildrenListSnapshot();
795-
for (CClientEntity* pEntity : *pChildrenSnapshot)
794+
for (CClientEntity* pEntity : *GetChildrenListSnapshot())
796795
{
797796
if (!pEntity->IsBeingDeleted())
798797
{

Client/mods/deathmatch/logic/CClientExplosionManager.cpp

Lines changed: 18 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -39,23 +39,6 @@ bool CClientExplosionManager::Hook_StaticExplosionCreation(CEntity* pGameExplodi
3939
return g_pExplosionManager->Hook_ExplosionCreation(pGameExplodingEntity, pGameCreator, vecPosition, explosionType);
4040
}
4141

42-
eWeaponType CClientExplosionManager::GetWeaponTypeFromExplosionType(const eExplosionType explosionType)
43-
{
44-
switch (explosionType) {
45-
case EXP_TYPE_GRENADE:
46-
return WEAPONTYPE_GRENADE;
47-
case EXP_TYPE_MOLOTOV:
48-
return WEAPONTYPE_MOLOTOV;
49-
case EXP_TYPE_ROCKET:
50-
case EXP_TYPE_ROCKET_WEAK:
51-
return WEAPONTYPE_ROCKET;
52-
case EXP_TYPE_TANK_GRENADE:
53-
return WEAPONTYPE_TANK_GRENADE;
54-
default:
55-
return WEAPONTYPE_EXPLOSION;
56-
}
57-
}
58-
5942
bool CClientExplosionManager::Hook_ExplosionCreation(CEntity* pGameExplodingEntity, CEntity* pGameCreator, const CVector& vecPosition,
6043
eExplosionType explosionType)
6144
{
@@ -70,23 +53,7 @@ bool CClientExplosionManager::Hook_ExplosionCreation(CEntity* pGameExplodingEnti
7053
CClientEntity* const pResponsible = pPools->GetClientEntity(reinterpret_cast<DWORD*>(pResponsibleGameEntity->GetInterface()));
7154

7255
if (!pResponsible)
73-
{
74-
if (!pGameCreator)
75-
return false;
76-
77-
CClientPlayer* localPlayer = m_pManager->GetPlayerManager()->GetLocalPlayer();
78-
if (!localPlayer || localPlayer->GetGameEntity() != pGameCreator)
79-
return false;
80-
81-
eWeaponType explosionWeaponType = GetWeaponTypeFromExplosionType(explosionType);
82-
83-
CLuaArguments arguments;
84-
arguments.PushNumber(vecPosition.fX);
85-
arguments.PushNumber(vecPosition.fY);
86-
arguments.PushNumber(vecPosition.fZ);
87-
arguments.PushNumber(explosionWeaponType);
88-
return localPlayer->CallEvent("onClientExplosion", arguments, true);
89-
}
56+
return false;
9057

9158
// Determine the used weapon
9259
eWeaponType explosionWeaponType = WEAPONTYPE_EXPLOSION;
@@ -200,22 +167,25 @@ CExplosion* CClientExplosionManager::Create(eExplosionType explosionType, CVecto
200167
if (responsibleWeapon != WEAPONTYPE_UNARMED)
201168
m_LastWeaponType = responsibleWeapon;
202169
else
203-
m_LastWeaponType = GetWeaponTypeFromExplosionType(explosionType);
204-
205-
if (pCreator && pCreator->IsLocalEntity())
206170
{
207-
bool allowExplosion = Hook_ExplosionCreation(nullptr, pGameCreator, vecPosition, explosionType);
208-
if (!allowExplosion)
209-
return nullptr;
210-
}
211-
else if (!pCreator)
212-
{
213-
CClientPlayer* localPlayer = m_pManager->GetPlayerManager()->GetLocalPlayer();
214-
if (localPlayer)
171+
switch (explosionType)
215172
{
216-
bool allowExplosion = Hook_ExplosionCreation(nullptr, localPlayer->GetGameEntity(), vecPosition, explosionType);
217-
if (!allowExplosion)
218-
return nullptr;
173+
case EXP_TYPE_GRENADE:
174+
m_LastWeaponType = WEAPONTYPE_GRENADE;
175+
break;
176+
case EXP_TYPE_MOLOTOV:
177+
m_LastWeaponType = WEAPONTYPE_MOLOTOV;
178+
break;
179+
case EXP_TYPE_ROCKET:
180+
case EXP_TYPE_ROCKET_WEAK:
181+
m_LastWeaponType = WEAPONTYPE_ROCKET;
182+
break;
183+
case EXP_TYPE_TANK_GRENADE:
184+
m_LastWeaponType = WEAPONTYPE_TANK_GRENADE;
185+
break;
186+
default:
187+
m_LastWeaponType = WEAPONTYPE_EXPLOSION;
188+
break;
219189
}
220190
}
221191

Client/mods/deathmatch/logic/CClientExplosionManager.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,5 @@ class CClientExplosionManager
3434
CClientEntityPtr m_pLastCreator;
3535

3636
private:
37-
CClientManager* m_pManager;
38-
eWeaponType GetWeaponTypeFromExplosionType(const eExplosionType explosionType);
37+
CClientManager* m_pManager;
3938
};

Client/mods/deathmatch/logic/CClientPed.cpp

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4649,20 +4649,12 @@ float CClientPed::GetDistanceFromGround()
46494649
return (vecPosition.fZ - fGroundLevel);
46504650
}
46514651

4652-
bool CClientPed::IsOnGround(bool checkVehicles)
4652+
bool CClientPed::IsOnGround()
46534653
{
46544654
CVector vecPosition;
46554655
GetPosition(vecPosition);
46564656
float fGroundLevel = static_cast<float>(g_pGame->GetWorld()->FindGroundZFor3DPosition(&vecPosition));
4657-
4658-
if (DefinitelyLessThan(vecPosition.fZ, fGroundLevel))
4659-
return false;
4660-
4661-
bool isOnGround = DefinitelyLessThan((vecPosition.fZ - fGroundLevel), 1.0f) || EssentiallyEqual((vecPosition.fZ - fGroundLevel), 1.0f);
4662-
if (!isOnGround && checkVehicles && m_pPlayerPed)
4663-
return m_pPlayerPed->IsStandingOnEntity();
4664-
4665-
return isOnGround;
4657+
return (vecPosition.fZ > fGroundLevel && (vecPosition.fZ - fGroundLevel) <= 1.0f);
46664658
}
46674659

46684660
bool CClientPed::IsClimbing()

0 commit comments

Comments
 (0)