Skip to content

Commit 3acf6ff

Browse files
authored
Merge branch 'master' into startstop
2 parents 9b4c33d + 93963a9 commit 3acf6ff

40 files changed

+3347
-2500
lines changed

Client/core/CMessageLoopHook.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -518,6 +518,13 @@ LRESULT CALLBACK CMessageLoopHook::ProcessMessage(HWND hwnd, UINT uMsg, WPARAM w
518518
return true;
519519
}
520520

521+
// Process ALT + F4
522+
if (uMsg == WM_SYSKEYDOWN && wParam == VK_F4)
523+
{
524+
// Tell windows to handle this message.
525+
return DefWindowProcW(hwnd, uMsg, wParam, lParam);
526+
}
527+
521528
// If we handled mouse steering, don't let GTA.
522529
// if ( !CCore::GetSingleton ().GetMouseControl()->ProcessMouseMove ( uMsg, wParam, lParam ) )
523530
// Call GTA's window procedure.

Client/mods/deathmatch/logic/CClientBuildingManager.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,11 @@ class CClientBuildingManager
4040

4141
private:
4242
bool DoPoolResize(size_t newCapacity);
43-
void AddToList(CClientBuilding* pBuilding) { m_List.push_back(pBuilding); }
43+
void AddToList(CClientBuilding* pBuilding)
44+
{
45+
ResizePoolIfNeeds();
46+
m_List.push_back(pBuilding);
47+
}
4448
void RemoveFromList(CClientBuilding* pBuilding);
4549

4650
std::list<CClientBuilding*> m_List;

Client/mods/deathmatch/logic/CClientGame.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,12 @@ class CClientGame
129129
SCRIPTFILE,
130130
WATER,
131131
WEAPON,
132-
POINTLIGHTS,
132+
_DATABASE_CONNECTION, // server only
133+
TRAIN_TRACK,
134+
ROOT,
133135
UNKNOWN,
136+
BUILDING,
137+
POINTLIGHTS,
134138
};
135139

136140
enum

Client/mods/deathmatch/logic/CClientPlayerVoice.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,20 @@ bool CClientPlayerVoice::IsFxEffectEnabled(uint uiFxEffect)
398398
return m_EnabledEffects[uiFxEffect] ? true : false;
399399
}
400400

401+
bool CClientPlayerVoice::SetFxEffectParameters(std::uint32_t uiFxEffect, void* params)
402+
{
403+
if (IsFxEffectEnabled(uiFxEffect))
404+
return BASS_FXSetParameters(m_FxEffects[uiFxEffect], params);
405+
return false;
406+
}
407+
408+
bool CClientPlayerVoice::GetFxEffectParameters(std::uint32_t uiFxEffect, void* params)
409+
{
410+
if (IsFxEffectEnabled(uiFxEffect))
411+
return BASS_FXGetParameters(m_FxEffects[uiFxEffect], params);
412+
return false;
413+
}
414+
401415
bool CClientPlayerVoice::GetPan(float& fPan)
402416
{
403417
fPan = 0.0f;

Client/mods/deathmatch/logic/CClientPlayerVoice.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ class CClientPlayerVoice
7373
bool SetFxEffect(uint uiFxEffect, bool bEnable);
7474
bool IsFxEffectEnabled(uint uiFxEffect);
7575

76+
bool SetFxEffectParameters(std::uint32_t uiFxEffect, void* params);
77+
bool GetFxEffectParameters(std::uint32_t uiFxEffect, void* params);
78+
7679
bool IsActive() { return m_bVoiceActive; }
7780

7881
private:

Client/mods/deathmatch/logic/CPacketHandler.cpp

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4219,6 +4219,26 @@ void CPacketHandler::Packet_EntityAdd(NetBitStreamInterface& bitStream)
42194219
break;
42204220
}
42214221

4222+
case CClientGame::BUILDING:
4223+
{
4224+
std::uint16_t modelId;
4225+
SRotationRadiansSync rotationRadians(false);
4226+
4227+
// Read out the position, rotation, object ID
4228+
bitStream.Read(&position);
4229+
bitStream.Read(&rotationRadians);
4230+
bitStream.ReadCompressed(modelId);
4231+
4232+
if (!CClientBuildingManager::IsValidModel(modelId))
4233+
modelId = 1700;
4234+
4235+
bitStream.Read(LowLodObjectID);
4236+
CClientBuilding* pBuilding = new CClientBuilding(g_pClientGame->m_pManager, EntityID, modelId, position.data.vecPosition, rotationRadians.data.vecRotation, ucInterior);
4237+
4238+
pBuilding->SetUsesCollision(bCollisonsEnabled);
4239+
break;
4240+
}
4241+
42224242
default:
42234243
{
42244244
assert(0);
@@ -4288,10 +4308,18 @@ void CPacketHandler::Packet_EntityAdd(NetBitStreamInterface& bitStream)
42884308

42894309
if (TempLowLodObjectID != INVALID_ELEMENT_ID)
42904310
{
4291-
CClientObject* pTempObject = DynamicCast<CClientObject>(pTempEntity);
4292-
CClientObject* pLowLodObject = DynamicCast<CClientObject>(CElementIDs::GetElement(TempLowLodObjectID));
4293-
if (pTempObject)
4294-
pTempObject->SetLowLodObject(pLowLodObject);
4311+
if (CClientObject* pTempObject = DynamicCast<CClientObject>(pTempEntity))
4312+
{
4313+
CClientObject* pLowLodObject = DynamicCast<CClientObject>(CElementIDs::GetElement(TempLowLodObjectID));
4314+
if (pTempObject)
4315+
pTempObject->SetLowLodObject(pLowLodObject);
4316+
}
4317+
else if (CClientBuilding* pTempObject = DynamicCast<CClientBuilding>(pTempEntity))
4318+
{
4319+
CClientBuilding* pLowLod = DynamicCast<CClientBuilding>(CElementIDs::GetElement(TempLowLodObjectID));
4320+
if (pTempObject)
4321+
pTempObject->SetLowLodBuilding(pLowLod);
4322+
}
42954323
}
42964324

42974325
delete pEntityStuff;

0 commit comments

Comments
 (0)