From 5f21c32fb0725140d6d03476e08de330d429b55a Mon Sep 17 00:00:00 2001 From: FileEX Date: Wed, 2 Oct 2024 15:04:49 +0200 Subject: [PATCH 01/15] Fix #3760 isPlayerCrosshairVisible returns true at the start of aiming (#3762) --- Client/game_sa/CCameraSA.cpp | 5 +++ Client/game_sa/CCameraSA.h | 13 ++---- Client/game_sa/CEntitySA.h | 2 +- Client/game_sa/CHudSA.cpp | 62 +++++++++++++++++---------- Client/game_sa/CPedIntelligenceSA.cpp | 14 ++++++ Client/game_sa/CPedIntelligenceSA.h | 1 + Client/game_sa/CPedSA.h | 13 +++++- Client/game_sa/CPlayerInfoSA.h | 7 ++- Client/sdk/game/CCamera.h | 2 + Client/sdk/game/CPed.h | 3 ++ Client/sdk/game/CPedIntelligence.h | 2 + Client/sdk/game/TaskAttack.h | 2 + 12 files changed, 87 insertions(+), 39 deletions(-) diff --git a/Client/game_sa/CCameraSA.cpp b/Client/game_sa/CCameraSA.cpp index 960ec7cfa7..2e8f6b6eb8 100644 --- a/Client/game_sa/CCameraSA.cpp +++ b/Client/game_sa/CCameraSA.cpp @@ -458,3 +458,8 @@ void CCameraSA::ResetShakeCamera() noexcept { GetInterface()->m_fCamShakeForce = 0.0f; } + +std::uint8_t CCameraSA::GetTransitionState() +{ + return GetInterface()->m_uiTransitionState; +} diff --git a/Client/game_sa/CCameraSA.h b/Client/game_sa/CCameraSA.h index 246f3362d8..6ccf5fe471 100644 --- a/Client/game_sa/CCameraSA.h +++ b/Client/game_sa/CCameraSA.h @@ -82,6 +82,7 @@ class CCameraSAInterface public: // CPlaceable CPlaceableSAInterface Placeable; + std::uint8_t specialPadding[4]; // Temporary padding due to incorrect CPlaceableSAInterface class // End CPlaceable // move these out the class, have decided to set up a mirrored enumerated type thingy at the top @@ -131,16 +132,6 @@ class CCameraSAInterface bool m_bCooperativeCamMode; bool m_bAllowShootingWith2PlayersInCar; bool m_bDisableFirstPersonInCar; - static bool m_bUseMouse3rdPerson; -#ifndef FINALBUILD - bool bStaticFrustum; -#endif - - // for debug keyboard stuff -#ifndef MASTER - unsigned char display_kbd_debug; - float kbd_fov_value; -#endif // MASTER // The following fields allow the level designers to specify the camera for 2 player games. short m_ModeForTwoPlayersSeparateCars; @@ -430,4 +421,6 @@ class CCameraSA : public CCamera void ShakeCamera(float radius, float x, float y, float z) noexcept override; void ResetShakeCamera() noexcept override; + + std::uint8_t GetTransitionState(); }; diff --git a/Client/game_sa/CEntitySA.h b/Client/game_sa/CEntitySA.h index 548cb657f6..fe0f2d77ae 100644 --- a/Client/game_sa/CEntitySA.h +++ b/Client/game_sa/CEntitySA.h @@ -123,7 +123,7 @@ class CPlaceableSAInterface // 20 bytes class CEntitySAInterface { public: - CEntitySAInterfaceVTBL* vtbl; // the virtual table + CEntitySAInterfaceVTBL* vtbl; // the virtual table it should be in the CPlaceableSAInterface CPlaceableSAInterface Placeable; // 4 diff --git a/Client/game_sa/CHudSA.cpp b/Client/game_sa/CHudSA.cpp index a63f470349..6b9c2ff770 100644 --- a/Client/game_sa/CHudSA.cpp +++ b/Client/game_sa/CHudSA.cpp @@ -13,6 +13,8 @@ #include "CHudSA.h" #include "CGameSA.h" #include "CCameraSA.h" +#include "CPlayerInfoSA.h" +#include "TaskAttackSA.h" extern CGameSA* pGame; @@ -178,35 +180,51 @@ void CHudSA::ResetComponentAdjustment() bool CHudSA::IsCrosshairVisible() { - if (!IsComponentVisible(HUD_CROSSHAIR)) - return false; + bool specialAiming = false; + bool simpleAiming = false; + // Get camera view mode CCamera* camera = pGame->GetCamera(); eCamMode cameraViewMode = static_cast(camera->GetCam(camera->GetActiveCam())->GetMode()); - switch (cameraViewMode) + // Get player + CPed* playerPed = pGame->GetPedContext(); + CWeapon* weapon = nullptr; + eWeaponType weaponType; + + // Get player current weapon + if (playerPed) + { + weapon = playerPed->GetWeapon(playerPed->GetCurrentWeaponSlot()); + if (weapon) + weaponType = weapon->GetType(); + } + + // Special aiming + if (cameraViewMode == MODE_SNIPER || cameraViewMode == MODE_1STPERSON || cameraViewMode == MODE_ROCKETLAUNCHER || cameraViewMode == MODE_ROCKETLAUNCHER_HS || cameraViewMode == MODE_M16_1STPERSON || cameraViewMode == MODE_HELICANNON_1STPERSON || cameraViewMode == MODE_CAMERA) + { + if (weapon && cameraViewMode != MODE_1STPERSON && pGame->GetWeaponInfo(weaponType, WEAPONSKILL_STD)->GetFireType() != FIRETYPE_MELEE) + specialAiming = true; + } + + // Simple aiming + if (cameraViewMode == MODE_M16_1STPERSON_RUNABOUT || cameraViewMode == MODE_ROCKETLAUNCHER_RUNABOUT || cameraViewMode == MODE_ROCKETLAUNCHER_RUNABOUT_HS || cameraViewMode == MODE_SNIPER_RUNABOUT) + simpleAiming = true; + + if ((playerPed && weapon) && !playerPed->GetTargetedObject() && playerPed->GetPedInterface()->pPlayerData->m_bFreeAiming) { - case MODE_SNIPER_RUNABOUT: - case MODE_ROCKETLAUNCHER_RUNABOUT: - case MODE_ROCKETLAUNCHER_RUNABOUT_HS: - case MODE_M16_1STPERSON_RUNABOUT: - case MODE_1STPERSON_RUNABOUT: - case MODE_AIMWEAPON: - case MODE_AIMWEAPON_ATTACHED: - case MODE_AIMWEAPON_FROMCAR: - case MODE_M16_1STPERSON: - case MODE_HELICANNON_1STPERSON: - case MODE_SNIPER: - case MODE_ROCKETLAUNCHER: - case MODE_ROCKETLAUNCHER_HS: - case MODE_AIMING: - case MODE_CAMERA: - return true; - default: - break; + CTaskSimpleUseGun* taskUseGun = playerPed->GetPedIntelligence()->GetTaskUseGun(); + if ((!taskUseGun || !taskUseGun->GetSkipAim()) && (cameraViewMode == MODE_AIMWEAPON || cameraViewMode == MODE_AIMWEAPON_FROMCAR || cameraViewMode == MODE_AIMWEAPON_ATTACHED)) + { + if (playerPed->GetPedState() != PED_ENTER_CAR && playerPed->GetPedState() != PED_CARJACK) + { + if ((weaponType >= WEAPONTYPE_PISTOL && weaponType <= WEAPONTYPE_M4) || weaponType == WEAPONTYPE_TEC9 || weaponType == WEAPONTYPE_COUNTRYRIFLE || weaponType == WEAPONTYPE_MINIGUN || weaponType == WEAPONTYPE_FLAMETHROWER) + simpleAiming = cameraViewMode != MODE_AIMWEAPON || camera->GetTransitionState() == 0; + } + } } // Check CTheScripts::bDrawCrossHair std::uint8_t crossHairType = *reinterpret_cast(VAR_CTheScripts_bDrawCrossHair); - return crossHairType > 0; + return specialAiming || simpleAiming || crossHairType > 0; } diff --git a/Client/game_sa/CPedIntelligenceSA.cpp b/Client/game_sa/CPedIntelligenceSA.cpp index 3c5b1359d0..e6752a96da 100644 --- a/Client/game_sa/CPedIntelligenceSA.cpp +++ b/Client/game_sa/CPedIntelligenceSA.cpp @@ -14,6 +14,7 @@ #include "CPedSA.h" #include "CTaskManagementSystemSA.h" #include "CTaskManagerSA.h" +#include "TaskAttackSA.h" CPedIntelligenceSA::CPedIntelligenceSA(CPedIntelligenceSAInterface* pedIntelligenceSAInterface, CPed* ped) { @@ -55,3 +56,16 @@ CTaskSAInterface* CPedIntelligenceSA::SetTaskDuckSecondary(unsigned short nLengt auto SetTaskDuckSecondary = (CTaskSAInterface * (__thiscall*)(CPedIntelligenceSAInterface*, unsigned short))0x601230; return SetTaskDuckSecondary(internalInterface, nLengthOfDuck); } + +CTaskSimpleUseGun* CPedIntelligenceSA::GetTaskUseGun() +{ + CTaskManager* taskMgr = GetTaskManager(); + if (!taskMgr) + return nullptr; + + CTask* secondaryTask = taskMgr->GetTaskSecondary(TASK_SECONDARY_ATTACK); + if (secondaryTask && secondaryTask->GetTaskType() == TASK_SIMPLE_USE_GUN) + return dynamic_cast(secondaryTask); + + return nullptr; +} diff --git a/Client/game_sa/CPedIntelligenceSA.h b/Client/game_sa/CPedIntelligenceSA.h index 7e813193c0..10cfe322ce 100644 --- a/Client/game_sa/CPedIntelligenceSA.h +++ b/Client/game_sa/CPedIntelligenceSA.h @@ -54,4 +54,5 @@ class CPedIntelligenceSA : public CPedIntelligence CTaskManager* GetTaskManager(); bool TestForStealthKill(CPed* pPed, bool bUnk); CTaskSAInterface* SetTaskDuckSecondary(unsigned short nLengthOfDuck); + CTaskSimpleUseGun* GetTaskUseGun(); }; diff --git a/Client/game_sa/CPedSA.h b/Client/game_sa/CPedSA.h index fee84fd651..668d2367c7 100644 --- a/Client/game_sa/CPedSA.h +++ b/Client/game_sa/CPedSA.h @@ -230,7 +230,12 @@ class CPedSAInterface : public CPhysicalSAInterface // +1420 = curre int iMoveAnimGroup; // 1236 BYTE bPad4b[52]; CPedIKSAInterface pedIK; // 1292 (length 32 bytes) - int bPad5[5]; + + std::uint32_t field_52C; + ePedState pedState; + eMoveState moveState; + eMoveState swimmingMoveState; + std::uint32_t field_53C; float fHealth; int iUnknown121; @@ -258,7 +263,8 @@ class CPedSAInterface : public CPhysicalSAInterface // +1420 = curre // weapons at +1440 ends at +1804 BYTE bPad4[12]; BYTE bCurrentWeaponSlot; // is actually here - BYTE bPad6[20]; + BYTE bPad6[3]; + CEntitySAInterface* pTargetedObject; BYTE bFightingStyle; // 1837 BYTE bFightingStyleExtra; BYTE bPad7[1]; @@ -408,5 +414,8 @@ class CPedSA : public virtual CPed, public virtual CPhysicalSA std::unique_ptr GetPedIK() { return std::make_unique(GetPedIKInterface()); } static void StaticSetHooks(); + CEntitySAInterface* GetTargetedObject() { return GetPedInterface()->pTargetedObject; } + ePedState GetPedState() { return GetPedInterface()->pedState; } + void GetAttachedSatchels(std::vector &satchelsList) const override; }; diff --git a/Client/game_sa/CPlayerInfoSA.h b/Client/game_sa/CPlayerInfoSA.h index a8b3a84f44..fd73385f05 100644 --- a/Client/game_sa/CPlayerInfoSA.h +++ b/Client/game_sa/CPlayerInfoSA.h @@ -41,8 +41,9 @@ class CPlayerPedDataSAInterface CVector2D m_vecFightMovement; // 12 float m_moveBlendRatio; // 20 - float m_fSprintEnergy; // 24 - // FLOAT m_fSprintControlCounter; // Removed arbitatrily to aligned next byte, should be here really + float m_fTimeCanRun; + float m_fSprintEnergy; + BYTE m_nChosenWeapon; // 28 BYTE m_nCarDangerCounter; // 29 BYTE m_pad0; // 30 @@ -68,8 +69,6 @@ class CPlayerPedDataSAInterface DWORD m_bInVehicleDontAllowWeaponChange : 1; // stop weapon change once driveby weapon has been given DWORD m_bRenderWeapon : 1; // set to false during cutscenes so that knuckledusters are not rendered - DWORD m_pad2; // 56 - long m_PlayerGroup; // 60 DWORD m_AdrenalineEndTime; // 64 diff --git a/Client/sdk/game/CCamera.h b/Client/sdk/game/CCamera.h index 7dc104e3c0..57ede01f01 100644 --- a/Client/sdk/game/CCamera.h +++ b/Client/sdk/game/CCamera.h @@ -146,4 +146,6 @@ class CCamera virtual void ShakeCamera(float radius, float x, float y, float z) noexcept = 0; virtual void ResetShakeCamera() noexcept = 0; + + virtual std::uint8_t GetTransitionState() = 0; }; diff --git a/Client/sdk/game/CPed.h b/Client/sdk/game/CPed.h index 4e91cdb8b4..22fb276923 100644 --- a/Client/sdk/game/CPed.h +++ b/Client/sdk/game/CPed.h @@ -285,5 +285,8 @@ class CPed : public virtual CPhysical virtual void* GetPedNodeInterface(std::int32_t nodeId) = 0; virtual std::unique_ptr GetPedIK() = 0; + virtual CEntitySAInterface* GetTargetedObject() = 0; + virtual ePedState GetPedState() = 0; + virtual void GetAttachedSatchels(std::vector &satchelsList) const = 0; }; diff --git a/Client/sdk/game/CPedIntelligence.h b/Client/sdk/game/CPedIntelligence.h index 37704ed893..f9d662e94d 100644 --- a/Client/sdk/game/CPedIntelligence.h +++ b/Client/sdk/game/CPedIntelligence.h @@ -14,6 +14,7 @@ class CPed; class CTaskSAInterface; class CTaskManager; +class CTaskSimpleUseGun; class CPedIntelligence { @@ -21,4 +22,5 @@ class CPedIntelligence virtual CTaskManager* GetTaskManager() = 0; virtual bool TestForStealthKill(CPed* pPed, bool bUnk) = 0; virtual CTaskSAInterface* SetTaskDuckSecondary(unsigned short nLengthOfDuck) = 0; + virtual CTaskSimpleUseGun* GetTaskUseGun() = 0; }; diff --git a/Client/sdk/game/TaskAttack.h b/Client/sdk/game/TaskAttack.h index 9a63e8da20..c98d062848 100644 --- a/Client/sdk/game/TaskAttack.h +++ b/Client/sdk/game/TaskAttack.h @@ -44,6 +44,8 @@ class CTaskSimpleUseGun : public virtual CTaskSimple virtual bool ControlGun(CPed* pPed, CEntity* pTargetEntity, char nCommand) = 0; virtual bool ControlGunMove(CVector2D* pMoveVec) = 0; virtual void Reset(CPed* pPed, CEntity* pTargetEntity, CVector vecTarget, char nCommand, short nBurstLength = 1) = 0; + + virtual bool GetSkipAim() = 0; }; class CTaskSimpleFight : public virtual CTaskSimple From a550bbfff308eea5a41950a3342d11a55814663f Mon Sep 17 00:00:00 2001 From: Uladzislau Nikalayevich Date: Wed, 2 Oct 2024 23:59:55 +0300 Subject: [PATCH 02/15] Fix building crash (PR #3753) --- Client/game_sa/CBuildingsPoolSA.cpp | 3 +++ Client/game_sa/CEntitySA.h | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/Client/game_sa/CBuildingsPoolSA.cpp b/Client/game_sa/CBuildingsPoolSA.cpp index caa392c132..50ae14bb3c 100644 --- a/Client/game_sa/CBuildingsPoolSA.cpp +++ b/Client/game_sa/CBuildingsPoolSA.cpp @@ -151,6 +151,9 @@ void CBuildingsPoolSA::RemoveAllBuildings() RemoveBuildingFromWorld(building); + if (building->HasMatrix()) + building->RemoveMatrix(); + pBuildsingsPool->Release(i); (*m_pOriginalBuildingsBackup)[i].first = true; diff --git a/Client/game_sa/CEntitySA.h b/Client/game_sa/CEntitySA.h index fe0f2d77ae..205d5415f7 100644 --- a/Client/game_sa/CEntitySA.h +++ b/Client/game_sa/CEntitySA.h @@ -242,6 +242,10 @@ class CEntitySAInterface using vtbl_DeleteRwObject = void(__thiscall*)(CEntitySAInterface * pEntity); ((vtbl_DeleteRwObject)this->vtbl->DeleteRwObject)(this); }; + + bool HasMatrix() const noexcept { return Placeable.matrix != nullptr; } + + void RemoveMatrix() { ((void(__thiscall*)(void*))0x54F3B0)(this); } }; static_assert(sizeof(CEntitySAInterface) == 0x38, "Invalid size for CEntitySAInterface"); From 3084934b3bcd1bea104228f2f33eb7f5d19118e7 Mon Sep 17 00:00:00 2001 From: FileEX Date: Thu, 3 Oct 2024 19:34:00 +0200 Subject: [PATCH 03/15] Addendum to 5f21c32fb0725140d6d03476e08de330d429b55a (#3765) --- Client/game_sa/CPedSA.h | 1 + 1 file changed, 1 insertion(+) diff --git a/Client/game_sa/CPedSA.h b/Client/game_sa/CPedSA.h index 668d2367c7..ab16ea28f8 100644 --- a/Client/game_sa/CPedSA.h +++ b/Client/game_sa/CPedSA.h @@ -265,6 +265,7 @@ class CPedSAInterface : public CPhysicalSAInterface // +1420 = curre BYTE bCurrentWeaponSlot; // is actually here BYTE bPad6[3]; CEntitySAInterface* pTargetedObject; + BYTE tempPad[13]; BYTE bFightingStyle; // 1837 BYTE bFightingStyleExtra; BYTE bPad7[1]; From 9f579f3e92bf75242ff40b1f015391709c2c5503 Mon Sep 17 00:00:00 2001 From: Dutchman101 <12105539+Dutchman101@users.noreply.github.com> Date: Thu, 3 Oct 2024 20:17:29 +0000 Subject: [PATCH 04/15] Update CEF to 129.0.11+g57354b8+chromium-129.0.6668.90 --- utils/buildactions/install_cef.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/buildactions/install_cef.lua b/utils/buildactions/install_cef.lua index 9dc4ccdc71..8430fc68f8 100644 --- a/utils/buildactions/install_cef.lua +++ b/utils/buildactions/install_cef.lua @@ -9,8 +9,8 @@ local CEF_URL_PREFIX = "https://cef-builds.spotifycdn.com/cef_binary_" local CEF_URL_SUFFIX = "_windows32_minimal.tar.bz2" -- Change here to update CEF version -local CEF_VERSION = "129.0.6+ga918aa7+chromium-129.0.6668.29" -local CEF_HASH = "989b267d6c2eed6feed4ef304664763612619f1d4ca7f21d95a524c139870d36" +local CEF_VERSION = "129.0.11+g57354b8+chromium-129.0.6668.90" +local CEF_HASH = "a3e3e7add2235d1865a8570522ff87dba392e7b2d15bca0983ed2ebe19ea048b" function make_cef_download_url() return CEF_URL_PREFIX..http.escapeUrlParam(CEF_VERSION)..CEF_URL_SUFFIX From f96836397a075585d4d112eb7d0240f1abf361d4 Mon Sep 17 00:00:00 2001 From: FileEX Date: Thu, 3 Oct 2024 23:40:09 +0200 Subject: [PATCH 05/15] Fix Hydraulics stops working when using setVehicleHandling with player inside vehicle (#3647) --- Client/game_sa/CVehicleSA.cpp | 73 ++++++++++++++++++----------------- 1 file changed, 38 insertions(+), 35 deletions(-) diff --git a/Client/game_sa/CVehicleSA.cpp b/Client/game_sa/CVehicleSA.cpp index 91fb5440e0..ab1635c91d 100644 --- a/Client/game_sa/CVehicleSA.cpp +++ b/Client/game_sa/CVehicleSA.cpp @@ -684,6 +684,17 @@ void CVehicleSA::RemoveVehicleUpgrade(DWORD dwModelID) push dwModelID call dwFunc } + + // GTA SA only does this when CVehicle::ClearVehicleUpgradeFlags returns false. + // In the case of hydraulics and nitro, this function does not return false and the upgrade is never removed from the array + for (std::int16_t& upgrade : GetVehicleInterface()->m_upgrades) + { + if (upgrade == dwModelID) + { + upgrade = -1; + break; + } + } } bool CVehicleSA::DoesSupportUpgrade(const SString& strFrameName) @@ -1322,49 +1333,41 @@ void CVehicleSA::RecalculateHandling() // Put it in our interface CVehicleSAInterface* pInt = GetVehicleInterface(); unsigned int uiHandlingFlags = m_pHandlingData->GetInterface()->uiHandlingFlags; - // user error correction - NOS_INST = NOS Installed t/f - // if nos is installed we need the flag set - if (pInt->m_upgrades[0] && pInt->m_upgrades[0] >= 1008 && pInt->m_upgrades[0] <= 1010) + bool hydralicsInstalled = false, nitroInstalled = false; + + // We check whether the user has not set incorrect flags via handlingFlags in the case of nitro and hydraulics + // If this happened, we need to correct it + for (const std::int16_t& upgradeID : pInt->m_upgrades) { - // Flag not enabled? - if (uiHandlingFlags | HANDLING_NOS_Flag) + // Empty upgrades value is -1 + if (upgradeID < 0) + continue; + + // If NOS is installed we need set the flag + if ((upgradeID >= 1008 && upgradeID <= 1010) && !(uiHandlingFlags & HANDLING_NOS_Flag)) { - // Set zee flag uiHandlingFlags |= HANDLING_NOS_Flag; - m_pHandlingData->SetHandlingFlags(uiHandlingFlags); - } - } - else - { - // Flag Enabled? - if (uiHandlingFlags & HANDLING_NOS_Flag) - { - // Unset the flag - uiHandlingFlags &= ~HANDLING_NOS_Flag; - m_pHandlingData->SetHandlingFlags(uiHandlingFlags); + nitroInstalled = true; } - } - // Hydraulics Flag fixing - if (pInt->m_upgrades[1] && pInt->m_upgrades[1] == 1087) - { - // Flag not enabled? - if (uiHandlingFlags | HANDLING_Hydraulics_Flag) + + // If hydraulics is installed we need set the flag + if ((upgradeID == 1087) && !(uiHandlingFlags & HANDLING_Hydraulics_Flag)) { - // Set zee flag uiHandlingFlags |= HANDLING_Hydraulics_Flag; - m_pHandlingData->SetHandlingFlags(uiHandlingFlags); - } - } - else - { - // Flag Enabled? - if (uiHandlingFlags & HANDLING_Hydraulics_Flag) - { - // Unset the flag - uiHandlingFlags &= ~HANDLING_Hydraulics_Flag; - m_pHandlingData->SetHandlingFlags(uiHandlingFlags); + hydralicsInstalled = true; } } + + // If hydraulics isn't installed we need unset the flag + if ((!hydralicsInstalled) && (uiHandlingFlags & HANDLING_Hydraulics_Flag)) + uiHandlingFlags &= ~HANDLING_Hydraulics_Flag; + + // If NOS isn't installed we need unset the flag + if ((!nitroInstalled) && (uiHandlingFlags & HANDLING_NOS_Flag)) + uiHandlingFlags &= ~HANDLING_NOS_Flag; + + m_pHandlingData->SetHandlingFlags(uiHandlingFlags); + pInt->dwHandlingFlags = uiHandlingFlags; pInt->m_fMass = m_pHandlingData->GetInterface()->fMass; pInt->m_fTurnMass = m_pHandlingData->GetInterface()->fTurnMass; // * pGame->GetHandlingManager()->GetTurnMassMultiplier(); From 5220344eb50ad36ac04e23758a72973f0ac03113 Mon Sep 17 00:00:00 2001 From: Dutchman101 <12105539+Dutchman101@users.noreply.github.com> Date: Thu, 3 Oct 2024 23:08:44 +0000 Subject: [PATCH 06/15] Force rebuild From 52848571e392f5e4ab2475d07278c749c6445630 Mon Sep 17 00:00:00 2001 From: Dutchman101 <12105539+Dutchman101@users.noreply.github.com> Date: Thu, 3 Oct 2024 23:15:58 +0000 Subject: [PATCH 07/15] Force rebuild #2 For version control purposes From abffd8744e13fe1ee7c6a95c38b42ac3d5788201 Mon Sep 17 00:00:00 2001 From: Dutchman101 <12105539+Dutchman101@users.noreply.github.com> Date: Thu, 3 Oct 2024 23:30:05 +0000 Subject: [PATCH 08/15] Force rebuild #3 For version management purposes; this is the final one. From c87ff84b64d9293a3f97db64ce815ab370f48d2e Mon Sep 17 00:00:00 2001 From: FileEX Date: Sat, 5 Oct 2024 03:37:35 +0200 Subject: [PATCH 09/15] Another minor fix after #3760 (#3767) --- Client/game_sa/CPlayerPedSA.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Client/game_sa/CPlayerPedSA.cpp b/Client/game_sa/CPlayerPedSA.cpp index ad555041d0..534f8376c6 100644 --- a/Client/game_sa/CPlayerPedSA.cpp +++ b/Client/game_sa/CPlayerPedSA.cpp @@ -75,7 +75,7 @@ CPlayerPedSA::CPlayerPedSA(unsigned int nModelIndex) // Set default stuff m_pData->m_bRenderWeapon = true; m_pData->m_Wanted = pLocalWanted; - m_pData->m_fSprintEnergy = 1000.0f; + m_pData->m_fTimeCanRun = 1000.0f; // Clothes pointers or we'll crash later (TODO: Wrap up with some cloth classes and make it unique per player) m_pData->m_pClothes = pLocalClothes; From 1fdfdb8b8a693c8ac5270585fb3c407983b460ca Mon Sep 17 00:00:00 2001 From: Dutchman101 <12105539+Dutchman101@users.noreply.github.com> Date: Sat, 5 Oct 2024 02:40:09 +0000 Subject: [PATCH 10/15] Addendum to 47c2b89 --- Client/launch/Multi Theft Auto.manifest | 74 +++++++++++++++++++++++++ 1 file changed, 74 insertions(+) diff --git a/Client/launch/Multi Theft Auto.manifest b/Client/launch/Multi Theft Auto.manifest index 159fa06d34..c29803733a 100644 --- a/Client/launch/Multi Theft Auto.manifest +++ b/Client/launch/Multi Theft Auto.manifest @@ -1,5 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From ea6300de7ff5de4afd15a6559368365e243543a4 Mon Sep 17 00:00:00 2001 From: Dutchman101 Date: Sat, 5 Oct 2024 05:08:27 +0200 Subject: [PATCH 11/15] Update launcher --- Shared/data/launchers/Multi Theft Auto.exe | Bin 416136 -> 421256 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/Shared/data/launchers/Multi Theft Auto.exe b/Shared/data/launchers/Multi Theft Auto.exe index 99fcb3c6bf6af71e9a6bd69a50a13ea8d8b7a667..0fd7e719d4b648c267b4afc1c91735a1603d494f 100644 GIT binary patch delta 6735 zcmcgx3piA1A3rmgLKhL$7KY-J&=|@k_nlI*<(5n7pPF zr){g7c7{p&>ic5=ANX)J0Cbu)lmQ^2o{@&rEOp+#phiAk z90ss$HuVykmQTB_);|=g1OV-6d+9S(L#c^+)Sz+pH9AyHYu;p5lVDaulbY4g$A0DT zan(LF0d?1CC;>H{@3B9QjibI#rf$w8C4kfQ_n1`FP8TpV+zRMlUp}X^B+Go`x*O~t z(xfe&bX8^bW;$Sj;TU%oi=ApPJ)K#sq#|YZ(5)BHJ*Ox5+bU7Fvee&JC9+JlIgm!d z13+_ni83QmX+B_?zCwjz*Y_YzRbhBC$Z%KyF;NhK91UY&R3s)WL#!-#0)Zh@AOv}f zFd^b-XyhA<6ADN5B?J$P#t9(? z$&B$O1TK(O0&-9#a4sl<6H5?QI;W)^L zQT_lNQXc1mB2fe+5DkEk2Z4ZMi2f)G$Ec8#2r+Vv0%$xKgSbQt4A{@jC z5hjfJQUuEWa#YsAG30`vDhm3E7^J)f9wiVEBfw7}cqBUND4_gqVN@3g{um1c>lckILr`($SC`&PVu|6_!BEGk#z-)P6f)+&_nZ}BFai^Bv_duM^SUf|{^9drD|Wb8pa^G#0_dYT$WiTb zaEKcr#AWI4hpGsei1Mqo1&o$Eegmss0-Q1#p}K)bHEvi9)CZFggsf zf9Huqgjm5MPf1|K7RxO}U;g>9{iQ0Sf<$|tHso^27x}NRS&<82U;^zYh|G2vWdDue zTq0a%fG;=SlqU#GEF(L}!H*I8q6$-lUwDK-B1;(=rvK&&!nhz2rGO>+JA~n#Nse%y zLZvEDObm}P0>t~M93r$yS=&!MLcvl9Bgi0Xkg^{w!3fn_P@4e-9D)*5yZ70AgAtFn zq;={HBL?Zp;VfC^9vJBL{^7&VKlV=k(+dt*PsP3OL#`$xN{?x&T(Run&XnUs@?rlI z`0Kc|b*)f zlc)1ex`=ifZPnisTwLO8J16YL!VR6jb8W6*d=t*rjC0PlexcvS=(PI$IX+4=p#HZu zoyrOOzkYJ!sqQ%DBcCXv#|>D?8FpHoIC1X}MYSHunl8r5l}V_@u6XoeExR}U ze==An*=A>E^<&%<)cN-PdXj#f>!qG`)1>fpRK@<=c7-+@+_fkEs&BF7wXyXDBX@^G z5C6@0+?C?@N80#`Oq0@$oXPOGNjJxKC9=vo7H7Bp@7BpiYt7?}Qyy<8Iev|+R|b4n z+8)d!dpneX-3c1Bf^LU2`20I--KUi=k`2`+NGvmKbXBaUOk7nOcF=q6KJ6)QSH}94LS|VxB4)_UV(3ua z8(w=sa>8RpYy^1A9x)hgF?)M{iDgl{o3Dq^G$uxXtv{yQ~nk^cAj*^>#K#+~T5QL-ZH@ z=CeZ2Acq#eYf46u^Zl+xGsZ}}nMOP4W7LkXbE_||oH~)sVq06XSo2uydDfO}sk$4( zVY1raAJV=38B19?s|&-d7d+K@P@4BnxvRnZzH8{gUzS~2Ta)@>;J=N3;lvh?>X$9gX?S1;&V{LC8t*oX-KS@u0C_1m4* z%HqsDezA;l$f|7%=uWdw+VRaL;gpLukoU>L4vslJG7dA}_tZm7I>nx74X+-zb|U4ik|Cv9nn@Q*W4gEu8bG^76}9 zYqEFwX;eovzTkTnJG`rEx^SU;DGEA;R~g-T>?6sICL;@Pn*L;h?$Ky9Y_gy2{%UGI z#B6MJO~<^4zATU*G(wn$cuSlI@GmmuEo7pOt)D zKBo8ee9knTa)Y@Y$4qh%ur_+m5<~hWhbG_rM-|>$zyak=PjG}_CK-2cv#u`AOjuf7 zdN!kJ)2n1{qo!v8b>Cd#6Sp?^v@B!^bf)c(+?^HrhOssC33%0cY(dc7>e4e_+3sgG dA~L;pIN9uVK3h>TJ+4B1xoyyv{{K$^;Qxi8jKKf^ delta 1575 zcmYL}dpOez7{`CVU4D#0TD75?D62*@w=JApD@PYRZb{=%F0;ZA3Oh|>nOvGop`&=p zC32)jE0^Sw%h8M|6>5|sDz+l)tj_7_eV*_0yzlq(yx;e~motpz+{9MnK&`kJ13|$5 zH44B$RZwj+5Df!>I^K40n~FaK00;oMYo)}C0*zM#FBIfw5g~xHSuxn~?tqU~ejtB1 z0KDK`gz2Gd6pQN=Q1fOR?8pFEl}s2)B@BTA!VpYZ%j)OV?`d>}hBV;7(C7cMf3jr? zAFYtX3OL~KLj!N=l-=DkHQ>XA1XG`3D1_=`7+}PRVg%|FN!hyE zd|WFWDZnkkOf6yil~X;*aD@;8Pco9$jjHkn74ZO2#eax^&cKNPiSL1gDBl}FHWJzc z37)Ql^q||DpvZN&nlLw^-s1Cmp|E5GL8^G*|NOYcoB%&oQKW_*LkThj*$z;)8nZND zK;$iUsI{R=p4~75!eY-SmKbj7@1+doxXoz3hZC1Ws4XeGQ)J6Q5JUn977W<`m^F9N zm4WSD^&3h^K*7;%(T9q3E^WoXI@OIAURrRS@_}VIh-4u%Y2=s3^4N5{efP@Hw#lE2 z+y+0$0uo}9M4>`&&+z%*>F1g8b=TImPvx)7(iiVyY1e6sH&h8TWSi~FtI}sr?ZrmO zv29LKyu=I5J2M^G=TeH2ZFcq?nV?5S*pgZ9qsi)K&)dl+yIQ*PbIKFp;mf2NJ6k5u z5Xwl3A4+ZAljNV4|Hh16SI(F|F?THEdUF<}dpMX@%fm5++i;)UK<4YEMNwj)O#90O z&C0Ft_Gxo>9iD3BuJWTsF%u0-$gf_5cWk|F!Eghzk<#5c|JDX#!a261lqEJ9ZR^*T z7g-1kYZ|$!r1Jd?!gRb~#CyB8W_wQeypc}Zv_)m;H3Ef*@ikYsqLw&3Gsg+dYeLNC zx+c4l-c`%@Ntvn48*}nMA_rBH7@H}#W}S_D-VUbZJy|v}YX!14>I4Z0iFZb&Gh>!D`95h$+)6 zm`2NBy-b5DN`cy&Fe6?+(?loUo8ub;1j;gQU+Sd3kyKjD9nR!?ctD91RLl6$v(T%Y zuLnbx(&FM`$6WM3Dent&yn6ZB+1|Q4-(X5Ar3p5o9fvULBqGU_NFkDp&51-aV}YtC zWQA7wW$;~TkTda1`bn3iBbJ{{Mt44394OgK*X!jrEejYYt>q{I_0{v=g0G}I$#d+L zV(M=?Yc}8HchjI-Oxl41Yc8t=8ydSOdz{!RPOG+m;+DIbRZlHZzNk0sR~V>E)QXeH z^p87NAn$7#-VK;}>%<(5UBk;HUKrUJZHenEr*_H)xod~lZ}B8Mr|N#q>r$zxXl^^-7IbdVBu{%GAGOFa`O48|9^qKOkLKCAZ>V0kUhC_Jj@)=+fU=Oy*X*YTLMb>m zy7TPz#q4c5m75v^j(lV*b0*UhGpCnZHie4HC~WmZnUb;%et5e5$w|yZrQy{(_MS&w5~WlV;(wST^QSo*&{TYl`@+CLC2nsC>Z10oyG9L7p&dbPH${p$IDKZ&OQz; zC|NF@&#L;2+)AolXxfnx?-lARc5ge8b$^^`tByOHcwL##vxsRY`z1f}e^RxYn6|#K z@_B*~=sa%I!MTmjyDDAvcU>11PQ%ps4A8+3oz8eBEo#j*`^g3|KJ%6VlE*B3G|Gj^ zyISrGA6_FB<7}ie3+K@)jSQVtj(&fxO)(rLV5;p)R~C!@;`^G2XMJSvB;17+_t}L# z@92F#Mx9e?xYF_1vMYTW4Yd|Q+@#-p=R-3R Date: Sat, 5 Oct 2024 06:00:16 +0200 Subject: [PATCH 12/15] Revert ea6300d & 1fdfdb8 for now --- Client/launch/Multi Theft Auto.manifest | 74 --------------------- Shared/data/launchers/Multi Theft Auto.exe | Bin 421256 -> 416136 bytes 2 files changed, 74 deletions(-) diff --git a/Client/launch/Multi Theft Auto.manifest b/Client/launch/Multi Theft Auto.manifest index c29803733a..159fa06d34 100644 --- a/Client/launch/Multi Theft Auto.manifest +++ b/Client/launch/Multi Theft Auto.manifest @@ -1,79 +1,5 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Shared/data/launchers/Multi Theft Auto.exe b/Shared/data/launchers/Multi Theft Auto.exe index 0fd7e719d4b648c267b4afc1c91735a1603d494f..99fcb3c6bf6af71e9a6bd69a50a13ea8d8b7a667 100644 GIT binary patch delta 1575 zcmYL}dpOez7{`CVU4D#0TD75?D62*@w=JApD@PYRZb{=%F0;ZA3Oh|>nOvGop`&=p zC32)jE0^Sw%h8M|6>5|sDz+l)tj_7_eV*_0yzlq(yx;e~motpz+{9MnK&`kJ13|$5 zH44B$RZwj+5Df!>I^K40n~FaK00;oMYo)}C0*zM#FBIfw5g~xHSuxn~?tqU~ejtB1 z0KDK`gz2Gd6pQN=Q1fOR?8pFEl}s2)B@BTA!VpYZ%j)OV?`d>}hBV;7(C7cMf3jr? zAFYtX3OL~KLj!N=l-=DkHQ>XA1XG`3D1_=`7+}PRVg%|FN!hyE zd|WFWDZnkkOf6yil~X;*aD@;8Pco9$jjHkn74ZO2#eax^&cKNPiSL1gDBl}FHWJzc z37)Ql^q||DpvZN&nlLw^-s1Cmp|E5GL8^G*|NOYcoB%&oQKW_*LkThj*$z;)8nZND zK;$iUsI{R=p4~75!eY-SmKbj7@1+doxXoz3hZC1Ws4XeGQ)J6Q5JUn977W<`m^F9N zm4WSD^&3h^K*7;%(T9q3E^WoXI@OIAURrRS@_}VIh-4u%Y2=s3^4N5{efP@Hw#lE2 z+y+0$0uo}9M4>`&&+z%*>F1g8b=TImPvx)7(iiVyY1e6sH&h8TWSi~FtI}sr?ZrmO zv29LKyu=I5J2M^G=TeH2ZFcq?nV?5S*pgZ9qsi)K&)dl+yIQ*PbIKFp;mf2NJ6k5u z5Xwl3A4+ZAljNV4|Hh16SI(F|F?THEdUF<}dpMX@%fm5++i;)UK<4YEMNwj)O#90O z&C0Ft_Gxo>9iD3BuJWTsF%u0-$gf_5cWk|F!Eghzk<#5c|JDX#!a261lqEJ9ZR^*T z7g-1kYZ|$!r1Jd?!gRb~#CyB8W_wQeypc}Zv_)m;H3Ef*@ikYsqLw&3Gsg+dYeLNC zx+c4l-c`%@Ntvn48*}nMA_rBH7@H}#W}S_D-VUbZJy|v}YX!14>I4Z0iFZb&Gh>!D`95h$+)6 zm`2NBy-b5DN`cy&Fe6?+(?loUo8ub;1j;gQU+Sd3kyKjD9nR!?ctD91RLl6$v(T%Y zuLnbx(&FM`$6WM3Dent&yn6ZB+1|Q4-(X5Ar3p5o9fvULBqGU_NFkDp&51-aV}YtC zWQA7wW$;~TkTda1`bn3iBbJ{{Mt44394OgK*X!jrEejYYt>q{I_0{v=g0G}I$#d+L zV(M=?Yc}8HchjI-Oxl41Yc8t=8ydSOdz{!RPOG+m;+DIbRZlHZzNk0sR~V>E)QXeH z^p87NAn$7#-VK;}>%<(5UBk;HUKrUJZHenEr*_H)xod~lZ}B8Mr|N#q>r$zxXl^^-7IbdVBu{%GAGOFa`O48|9^qKOkLKCAZ>V0kUhC_Jj@)=+fU=Oy*X*YTLMb>m zy7TPz#q4c5m75v^j(lV*b0*UhGpCnZHie4HC~WmZnUb;%et5e5$w|yZrQy{(_MS&w5~WlV;(wST^QSo*&{TYl`@+CLC2nsC>Z10oyG9L7p&dbPH${p$IDKZ&OQz; zC|NF@&#L;2+)AolXxfnx?-lARc5ge8b$^^`tByOHcwL##vxsRY`z1f}e^RxYn6|#K z@_B*~=sa%I!MTmjyDDAvcU>11PQ%ps4A8+3oz8eBEo#j*`^g3|KJ%6VlE*B3G|Gj^ zyISrGA6_FB<7}ie3+K@)jSQVtj(&fxO)(rLV5;p)R~C!@;`^G2XMJSvB;17+_t}L# z@92F#Mx9e?xYF_1vMYTW4Yd|Q+@#-p=R-3RpPF zr){g7c7{p&>ic5=ANX)J0Cbu)lmQ^2o{@&rEOp+#phiAk z90ss$HuVykmQTB_);|=g1OV-6d+9S(L#c^+)Sz+pH9AyHYu;p5lVDaulbY4g$A0DT zan(LF0d?1CC;>H{@3B9QjibI#rf$w8C4kfQ_n1`FP8TpV+zRMlUp}X^B+Go`x*O~t z(xfe&bX8^bW;$Sj;TU%oi=ApPJ)K#sq#|YZ(5)BHJ*Ox5+bU7Fvee&JC9+JlIgm!d z13+_ni83QmX+B_?zCwjz*Y_YzRbhBC$Z%KyF;NhK91UY&R3s)WL#!-#0)Zh@AOv}f zFd^b-XyhA<6ADN5B?J$P#t9(? z$&B$O1TK(O0&-9#a4sl<6H5?QI;W)^L zQT_lNQXc1mB2fe+5DkEk2Z4ZMi2f)G$Ec8#2r+Vv0%$xKgSbQt4A{@jC z5hjfJQUuEWa#YsAG30`vDhm3E7^J)f9wiVEBfw7}cqBUND4_gqVN@3g{um1c>lckILr`($SC`&PVu|6_!BEGk#z-)P6f)+&_nZ}BFai^Bv_duM^SUf|{^9drD|Wb8pa^G#0_dYT$WiTb zaEKcr#AWI4hpGsei1Mqo1&o$Eegmss0-Q1#p}K)bHEvi9)CZFggsf zf9Huqgjm5MPf1|K7RxO}U;g>9{iQ0Sf<$|tHso^27x}NRS&<82U;^zYh|G2vWdDue zTq0a%fG;=SlqU#GEF(L}!H*I8q6$-lUwDK-B1;(=rvK&&!nhz2rGO>+JA~n#Nse%y zLZvEDObm}P0>t~M93r$yS=&!MLcvl9Bgi0Xkg^{w!3fn_P@4e-9D)*5yZ70AgAtFn zq;={HBL?Zp;VfC^9vJBL{^7&VKlV=k(+dt*PsP3OL#`$xN{?x&T(Run&XnUs@?rlI z`0Kc|b*)f zlc)1ex`=ifZPnisTwLO8J16YL!VR6jb8W6*d=t*rjC0PlexcvS=(PI$IX+4=p#HZu zoyrOOzkYJ!sqQ%DBcCXv#|>D?8FpHoIC1X}MYSHunl8r5l}V_@u6XoeExR}U ze==An*=A>E^<&%<)cN-PdXj#f>!qG`)1>fpRK@<=c7-+@+_fkEs&BF7wXyXDBX@^G z5C6@0+?C?@N80#`Oq0@$oXPOGNjJxKC9=vo7H7Bp@7BpiYt7?}Qyy<8Iev|+R|b4n z+8)d!dpneX-3c1Bf^LU2`20I--KUi=k`2`+NGvmKbXBaUOk7nOcF=q6KJ6)QSH}94LS|VxB4)_UV(3ua z8(w=sa>8RpYy^1A9x)hgF?)M{iDgl{o3Dq^G$uxXtv{yQ~nk^cAj*^>#K#+~T5QL-ZH@ z=CeZ2Acq#eYf46u^Zl+xGsZ}}nMOP4W7LkXbE_||oH~)sVq06XSo2uydDfO}sk$4( zVY1raAJV=38B19?s|&-d7d+K@P@4BnxvRnZzH8{gUzS~2Ta)@>;J=N3;lvh?>X$9gX?S1;&V{LC8t*oX-KS@u0C_1m4* z%HqsDezA;l$f|7%=uWdw+VRaL;gpLukoU>L4vslJG7dA}_tZm7I>nx74X+-zb|U4ik|Cv9nn@Q*W4gEu8bG^76}9 zYqEFwX;eovzTkTnJG`rEx^SU;DGEA;R~g-T>?6sICL;@Pn*L;h?$Ky9Y_gy2{%UGI z#B6MJO~<^4zATU*G(wn$cuSlI@GmmuEo7pOt)D zKBo8ee9knTa)Y@Y$4qh%ur_+m5<~hWhbG_rM-|>$zyak=PjG}_CK-2cv#u`AOjuf7 zdN!kJ)2n1{qo!v8b>Cd#6Sp?^v@B!^bf)c(+?^HrhOssC33%0cY(dc7>e4e_+3sgG dA~L;pIN9uVK3h>TJ+4B1xoyyv{{K$^;Qxi8jKKf^ From 9f54cfcd7a584f413db731052ebed921acfc71ea Mon Sep 17 00:00:00 2001 From: FileEX Date: Tue, 8 Oct 2024 03:44:41 +0200 Subject: [PATCH 13/15] Add new function spawnVehicleFlyingComponent (#3592) --- Client/game_sa/CAutomobileSA.h | 35 +----- Client/game_sa/CBikeSA.h | 18 ++- Client/game_sa/CBmxSA.h | 16 +++ Client/game_sa/CBoatSA.h | 20 +++- Client/game_sa/CTrainSA.h | 44 ++++--- Client/game_sa/CVehicleSA.cpp | 109 +++++++++++++++--- Client/game_sa/CVehicleSA.h | 16 ++- .../mods/deathmatch/logic/CClientVehicle.cpp | 8 ++ Client/mods/deathmatch/logic/CClientVehicle.h | 2 + .../logic/luadefs/CLuaVehicleDefs.cpp | 69 ++++++++++- .../logic/luadefs/CLuaVehicleDefs.h | 2 + .../deathmatch/logic/rpc/CVehicleRPCs.cpp | 14 +++ .../mods/deathmatch/logic/rpc/CVehicleRPCs.h | 1 + Client/sdk/game/CDamageManager.h | 43 +++++++ Client/sdk/game/CVehicle.h | 2 +- .../logic/CPerfStat.RPCPacketUsage.cpp | 1 + .../logic/CStaticFunctionDefinitions.cpp | 11 ++ .../logic/CStaticFunctionDefinitions.h | 1 + Server/mods/deathmatch/logic/CVehicle.h | 43 +++++++ .../logic/luadefs/CLuaVehicleDefs.cpp | 64 ++++++++++ .../logic/luadefs/CLuaVehicleDefs.h | 2 + Shared/sdk/net/rpc_enums.h | 2 + 22 files changed, 442 insertions(+), 81 deletions(-) diff --git a/Client/game_sa/CAutomobileSA.h b/Client/game_sa/CAutomobileSA.h index 701030a5a9..921c6638b3 100644 --- a/Client/game_sa/CAutomobileSA.h +++ b/Client/game_sa/CAutomobileSA.h @@ -21,39 +21,6 @@ #define MAX_PASSENGER_COUNT 8 #define MAX_DOORS 6 // also in CDamageManager -namespace eCarNode -{ - enum - { - NONE = 0, - CHASSIS = 1, - WHEEL_RF = 2, - WHEEL_RM = 3, - WHEEL_RB = 4, - WHEEL_LF = 5, - WHEEL_LM = 6, - WHEEL_LB = 7, - DOOR_RF = 8, - DOOR_RR = 9, - DOOR_LF = 10, - DOOR_LR = 11, - BUMP_FRONT = 12, - BUMP_REAR = 13, - WING_RF = 14, - WING_LF = 15, - BONNET = 16, - BOOT = 17, - WINDSCREEN = 18, - EXHAUST = 19, - MISC_A = 20, - MISC_B = 21, - MISC_C = 22, - MISC_D = 23, - MISC_E = 24, - NUM_NODES - }; -}; - class CBouncingPanelSAInterface { public: @@ -70,7 +37,7 @@ class CAutomobileSAInterface : public CVehicleSAInterface public: CDamageManagerSAInterface m_damageManager; CDoorSAInterface m_doors[MAX_DOORS]; - RwFrame* m_aCarNodes[eCarNode::NUM_NODES]; + RwFrame* m_aCarNodes[static_cast(eCarNodes::NUM_NODES)]; CBouncingPanelSAInterface m_panels[3]; CDoorSAInterface m_swingingChassis; CColPointSAInterface m_wheelColPoint[MAX_WHEELS]; diff --git a/Client/game_sa/CBikeSA.h b/Client/game_sa/CBikeSA.h index 65602ae525..083592e5fd 100644 --- a/Client/game_sa/CBikeSA.h +++ b/Client/game_sa/CBikeSA.h @@ -14,6 +14,22 @@ #include #include "CVehicleSA.h" +enum class eBikeNodes +{ + NONE = 0, + CHASSIS, + FORKS_FRONT, + FORKS_REAR, + WHEEL_FRONT, + WHEEL_REAR, + MUDGUARD, + HANDLEBARS, + MISC_A, + MISC_B, + + NUM_NODES +}; + struct sRideAnimData { int32 iAnimGroup; @@ -29,7 +45,7 @@ static_assert(sizeof(sRideAnimData) == 0x1C, "Invalid size for sRideAnimData"); class CBikeSAInterface : public CVehicleSAInterface { public: - int32 m_apModelNodes[10]; + RwFrame* m_apModelNodes[static_cast(eBikeNodes::NUM_NODES)]; int8 m_bLeanMatrixCalculated; int8 pad0[3]; // Maybe prev value is int32 int8 m_mLeanMatrix[72]; diff --git a/Client/game_sa/CBmxSA.h b/Client/game_sa/CBmxSA.h index 250a8bd5e6..dd64755c6d 100644 --- a/Client/game_sa/CBmxSA.h +++ b/Client/game_sa/CBmxSA.h @@ -14,6 +14,22 @@ #include #include "CBikeSA.h" +enum class eBmxNodes +{ + NONE = 0, + CHASSIS, + FORKS_FRONT, + FORKS_REAR, + WHEEL_FRONT, + WHEEL_REAR, + HANDLEBARS, + CHAINSET, + PEDAL_R, + PEDAL_L, + + NUM_NODES +}; + class CBmxSAInterface : public CBikeSAInterface { // fill this diff --git a/Client/game_sa/CBoatSA.h b/Client/game_sa/CBoatSA.h index 34f90003c7..6df3268bf0 100644 --- a/Client/game_sa/CBoatSA.h +++ b/Client/game_sa/CBoatSA.h @@ -14,12 +14,30 @@ #include #include "CVehicleSA.h" +enum class eBoatNodes +{ + NONE = 0, + MOVING, + WINDSCREEN, + RUDDER, + FLAP_LEFT, + FLAP_RIGHT, + REARFLAP_LEFT, + REARFLAP_RIGHT, + STATIC_PROP, + MOVING_PROP, + STATIC_PROP2, + MOVING_PROP2, + + NUM_NODES +}; + class CBoatSAInterface : public CVehicleSAInterface { public: uint32 pad1[3]; // 1440 uint32 BoatFlags; // 1452 - RwFrame* pBoatParts[11]; // 1456 [[ find out correct size + RwFrame* pBoatParts[static_cast(eBoatNodes::NUM_NODES)]; // 1456 uint32 pad2[3]; // 1500 uint16 pad3; // 1512 uint8 pad4[2]; // 1514 diff --git a/Client/game_sa/CTrainSA.h b/Client/game_sa/CTrainSA.h index 969fa907ee..84b25a6108 100644 --- a/Client/game_sa/CTrainSA.h +++ b/Client/game_sa/CTrainSA.h @@ -14,29 +14,27 @@ #include "CVehicleSA.h" #include "CDoorSA.h" -namespace eTrainNode +enum class eTrainNodes { - enum - { - NONE = 0, - DOOR_LF = 1, - DOOR_RF = 2, - WHEEL_RF1 = 3, - WHEEL_RF2 = 4, - WHEEL_RF3 = 5, - WHEEL_RB1 = 6, - WHEEL_RB2 = 7, - WHEEL_RB3 = 8, - WHEEL_LF1 = 9, - WHEEL_LF2 = 10, - WHEEL_LF3 = 11, - WHEEL_LB1 = 12, - WHEEL_LB2 = 13, - WHEEL_LB3 = 14, - BOGIE_FRONT = 15, - BOGIE_REAR = 16, - NUM_NODES - }; + NONE = 0, + DOOR_LF, + DOOR_RF, + WHEEL_RF1, + WHEEL_RF2, + WHEEL_RF3, + WHEEL_RB1, + WHEEL_RB2, + WHEEL_RB3, + WHEEL_LF1, + WHEEL_LF2, + WHEEL_LF3, + WHEEL_LB1, + WHEEL_LB2, + WHEEL_LB3, + BOGIE_FRONT, + BOGIE_REAR, + + NUM_NODES }; enum class eTrainPassengersGenerationState : unsigned char @@ -101,7 +99,7 @@ class CTrainSAInterface : public CVehicleSAInterface CTrainSAInterface* m_prevCarriage; CTrainSAInterface* m_nextCarriage; CDoorSAInterface m_aDoors[MAX_DOORS]; - RwFrame* m_aTrainNodes[eTrainNode::NUM_NODES]; + RwFrame* m_aTrainNodes[static_cast(eTrainNodes::NUM_NODES)]; }; static_assert(sizeof(CTrainSAInterface) == 0x6AC, "Invalid size for CTrainSAInterface"); diff --git a/Client/game_sa/CVehicleSA.cpp b/Client/game_sa/CVehicleSA.cpp index ab1635c91d..779661ed8a 100644 --- a/Client/game_sa/CVehicleSA.cpp +++ b/Client/game_sa/CVehicleSA.cpp @@ -21,6 +21,7 @@ #include "CTrainSA.h" #include "CPlaneSA.h" #include "CVehicleSA.h" +#include "CBoatSA.h" #include "CVisibilityPluginsSA.h" #include "CWorldSA.h" #include "gamesa_renderware.h" @@ -1504,27 +1505,97 @@ void CVehicleSA::SetGravity(const CVector* pvecGravity) m_vecGravity = *pvecGravity; } -CObject* CVehicleSA::SpawnFlyingComponent(int i_1, unsigned int ui_2) +bool CVehicleSA::SpawnFlyingComponent(const eCarNodes& nodeIndex, const eCarComponentCollisionTypes& collisionType, std::int32_t removalTime) { - DWORD dwReturn; - DWORD dwThis = (DWORD)GetInterface(); - DWORD dwFunc = FUNC_CAutomobile__SpawnFlyingComponent; - _asm + if (nodeIndex == eCarNodes::NONE) + return false; + + DWORD nodesOffset = OFFSET_CAutomobile_Nodes; + RwFrame* defaultBikeChassisFrame = nullptr; + + // CBike, CBmx, CBoat and CTrain don't inherit CAutomobile so let's do it manually! + switch (static_cast(GetVehicleInterface()->m_vehicleClass)) { - mov ecx, dwThis - push ui_2 - push i_1 - call dwFunc - mov dwReturn, eax + case VehicleClass::AUTOMOBILE: + case VehicleClass::MONSTER_TRUCK: + case VehicleClass::PLANE: + case VehicleClass::HELI: + case VehicleClass::TRAILER: + case VehicleClass::QUAD: + { + nodesOffset = OFFSET_CAutomobile_Nodes; + break; + } + case VehicleClass::TRAIN: + { + if (static_cast(nodeIndex) >= eTrainNodes::NUM_NODES) + return false; + + nodesOffset = OFFSET_CTrain_Nodes; + break; + } + case VehicleClass::BIKE: + case VehicleClass::BMX: + { + auto* bikeInterface = static_cast(GetVehicleInterface()); + if (!bikeInterface) + return false; + + if (static_cast(nodeIndex) >= eBikeNodes::NUM_NODES) + return false; + + nodesOffset = OFFSET_CBike_Nodes; + if (static_cast(nodeIndex) != eBikeNodes::CHASSIS) + break; + + // Set the correct "bike_chassis" frame for bikes + defaultBikeChassisFrame = bikeInterface->m_apModelNodes[1]; + if (defaultBikeChassisFrame && std::strcmp(defaultBikeChassisFrame->szName, "chassis_dummy") == 0) + { + RwFrame* correctChassisFrame = RwFrameFindFrame(RpGetFrame(bikeInterface->m_pRwObject), "chassis"); + if (correctChassisFrame) + bikeInterface->m_apModelNodes[1] = correctChassisFrame; + } + break; + } + case VehicleClass::BOAT: + { + if (static_cast(nodeIndex) >= eBoatNodes::NUM_NODES) + return false; + + nodesOffset = OFFSET_CBoat_Nodes; + break; + } + default: + return false; } - CObject* pObject = NULL; - if (dwReturn) + // Patch nodes array in CAutomobile::SpawnFlyingComponent + MemPut(0x6A85B3, nodesOffset); + MemPut(0x6A8631, nodesOffset); + + auto* componentObject = ((CObjectSAInterface * (__thiscall*)(CVehicleSAInterface*, int, int)) FUNC_CAutomobile__SpawnFlyingComponent)(GetVehicleInterface(), static_cast(nodeIndex), static_cast(collisionType)); + + // Restore default nodes array in CAutomobile::SpawnFlyingComponent + // CAutomobile::m_aCarNodes offset + MemPut(0x6A85B3, 0x648); + MemPut(0x6A8631, 0x648); + + // Restore default chassis frame for bikes + if (static_cast(nodeIndex) == eBikeNodes::CHASSIS && defaultBikeChassisFrame) { - SClientEntity* pObjectClientEntity = pGame->GetPools()->GetObject((DWORD*)dwReturn); - pObject = pObjectClientEntity ? pObjectClientEntity->pEntity : nullptr; + auto* bikeInterface = static_cast(GetVehicleInterface()); + if (bikeInterface && bikeInterface->m_apModelNodes) + bikeInterface->m_apModelNodes[1] = defaultBikeChassisFrame; } - return pObject; + + if (removalTime <= -1 || !componentObject) + return true; + + std::uint32_t CTimer_ms = *reinterpret_cast(VAR_CTimer_snTimeInMilliseconds); + componentObject->uiObjectRemovalTime = CTimer_ms + static_cast(removalTime); + + return true; } void CVehicleSA::SetWheelVisibility(eWheelPosition wheel, bool bVisible) @@ -1534,16 +1605,16 @@ void CVehicleSA::SetWheelVisibility(eWheelPosition wheel, bool bVisible) switch (wheel) { case FRONT_LEFT_WHEEL: - pFrame = vehicle->m_aCarNodes[eCarNode::WHEEL_LF]; + pFrame = vehicle->m_aCarNodes[static_cast(eCarNodes::WHEEL_LF)]; break; case REAR_LEFT_WHEEL: - pFrame = vehicle->m_aCarNodes[eCarNode::WHEEL_LB]; + pFrame = vehicle->m_aCarNodes[static_cast(eCarNodes::WHEEL_LB)]; break; case FRONT_RIGHT_WHEEL: - pFrame = vehicle->m_aCarNodes[eCarNode::WHEEL_RF]; + pFrame = vehicle->m_aCarNodes[static_cast(eCarNodes::WHEEL_RF)]; break; case REAR_RIGHT_WHEEL: - pFrame = vehicle->m_aCarNodes[eCarNode::WHEEL_RB]; + pFrame = vehicle->m_aCarNodes[static_cast(eCarNodes::WHEEL_RB)]; break; default: break; diff --git a/Client/game_sa/CVehicleSA.h b/Client/game_sa/CVehicleSA.h index 58632dabbf..382a071ac1 100644 --- a/Client/game_sa/CVehicleSA.h +++ b/Client/game_sa/CVehicleSA.h @@ -94,6 +94,20 @@ struct RwTexture; #define FUNC_CAutomobile_OnVehiclePreRender 0x6ABCFD #define FUNC_CVehicle_DoSunGlare 0x6DD6F0 +// CClumpModelInfo::GetFrameFromName +#define FUNC_CClumpModelInfo_GetFrameFromName 0x4C5400 + +// CAutomobile::m_aCarNodes +// CTrain::m_aTrainNodes +// CBike::m_apModelNodes +// CBoat::pBoatParts +#define OFFSET_CAutomobile_Nodes 0x648 +#define OFFSET_CTrain_Nodes 0x668 +#define OFFSET_CBike_Nodes 0x5A0 +#define OFFSET_CBoat_Nodes 0x5B0 + +#define VAR_CTimer_snTimeInMilliseconds 0xB7CB84 + struct SRailNodeSA { short sX; // x coordinate times 8 @@ -604,7 +618,7 @@ class CVehicleSA : public virtual CVehicle, public virtual CPhysicalSA SharedUtil::SColor GetHeadLightColor() { return m_HeadLightColor; } void SetHeadLightColor(const SharedUtil::SColor color) { m_HeadLightColor = color; } - CObject* SpawnFlyingComponent(int i_1, unsigned int ui_2); + bool SpawnFlyingComponent(const eCarNodes& nodeIndex, const eCarComponentCollisionTypes& collisionType, std::int32_t removalTime = -1); void SetWheelVisibility(eWheelPosition wheel, bool bVisible); CVector GetWheelPosition(eWheelPosition wheel); diff --git a/Client/mods/deathmatch/logic/CClientVehicle.cpp b/Client/mods/deathmatch/logic/CClientVehicle.cpp index e0e27dd417..a45d850a30 100644 --- a/Client/mods/deathmatch/logic/CClientVehicle.cpp +++ b/Client/mods/deathmatch/logic/CClientVehicle.cpp @@ -5037,6 +5037,14 @@ void CClientVehicle::ResetWheelScale() m_bWheelScaleChanged = false; } +bool CClientVehicle::SpawnFlyingComponent(const eCarNodes& nodeID, const eCarComponentCollisionTypes& collisionType, std::int32_t removalTime) +{ + if (!m_pVehicle) + return false; + + return m_pVehicle->SpawnFlyingComponent(nodeID, collisionType, removalTime); +} + CVector CClientVehicle::GetEntryPoint(std::uint32_t entryPointIndex) { static const uint32_t lookup[4] = {10, 8, 11, 9}; diff --git a/Client/mods/deathmatch/logic/CClientVehicle.h b/Client/mods/deathmatch/logic/CClientVehicle.h index e2c83c618e..76ec08eff1 100644 --- a/Client/mods/deathmatch/logic/CClientVehicle.h +++ b/Client/mods/deathmatch/logic/CClientVehicle.h @@ -543,6 +543,8 @@ class CClientVehicle : public CClientStreamElement bool SetDummyPosition(eVehicleDummies dummy, const CVector& position); bool ResetDummyPositions(); + bool SpawnFlyingComponent(const eCarNodes& nodeID, const eCarComponentCollisionTypes& collisionType, std::int32_t removalTime); + CVector GetEntryPoint(std::uint32_t entryPointIndex); protected: diff --git a/Client/mods/deathmatch/logic/luadefs/CLuaVehicleDefs.cpp b/Client/mods/deathmatch/logic/luadefs/CLuaVehicleDefs.cpp index b35bfee24b..6ac42bf386 100644 --- a/Client/mods/deathmatch/logic/luadefs/CLuaVehicleDefs.cpp +++ b/Client/mods/deathmatch/logic/luadefs/CLuaVehicleDefs.cpp @@ -155,6 +155,7 @@ void CLuaVehicleDefs::LoadFunctions() {"setVehicleVariant", ArgumentParser}, {"setVehicleWheelScale", ArgumentParser}, {"setVehicleModelWheelSize", ArgumentParser}, + {"spawnVehicleFlyingComponent", ArgumentParser}, }; // Add functions @@ -301,6 +302,8 @@ void CLuaVehicleDefs::AddClass(lua_State* luaVM) lua_classfunction(luaVM, "addUpgrade", "addVehicleUpgrade"); lua_classfunction(luaVM, "removeUpgrade", "removeVehicleUpgrade"); + lua_classfunction(luaVM, "spawnFlyingComponent", "spawnVehicleFlyingComponent"); + lua_classvariable(luaVM, "locked", "setVehicleLocked", "isVehicleLocked"); lua_classvariable(luaVM, "controller", NULL, "getVehicleController"); lua_classvariable(luaVM, "occupants", NULL, "getVehicleOccupants"); @@ -4233,7 +4236,7 @@ bool CLuaVehicleDefs::BlowVehicle(CClientEntity* entity, std::optional wit { return CStaticFunctionDefinitions::BlowVehicle(*entity, withExplosion); } - + std::variant, 4>> CLuaVehicleDefs::GetVehicleEntryPoints(CClientVehicle* vehicle) { auto entryPointVectors = OOP_GetVehicleEntryPoints(vehicle); @@ -4273,3 +4276,67 @@ std::variant> CLuaVehicleDefs::OOP_GetVehicleEntryP return entryPoints; } + +bool CLuaVehicleDefs::SpawnVehicleFlyingComponent(CClientVehicle* const vehicle, std::uint8_t nodeIndex, std::optional componentCollisionType, + std::optional removalTime) +{ + auto partNodeIndex = static_cast(nodeIndex); + auto collisionType = componentCollisionType.has_value() ? static_cast(componentCollisionType.value()) + : eCarComponentCollisionTypes::COL_NODE_PANEL; + + if (nodeIndex < 1 || partNodeIndex >= eCarNodes::NUM_NODES) + throw std::invalid_argument("Invalid component index"); + + if (collisionType >= eCarComponentCollisionTypes::COL_NODES_NUM) + throw std::invalid_argument("Invalid collision type index"); + + if (!componentCollisionType.has_value()) + { + switch (partNodeIndex) + { + case eCarNodes::WHEEL_RF: + case eCarNodes::WHEEL_RB: + case eCarNodes::WHEEL_LF: + case eCarNodes::WHEEL_LB: + { + collisionType = eCarComponentCollisionTypes::COL_NODE_WHEEL; + break; + } + case eCarNodes::DOOR_RF: + case eCarNodes::DOOR_RR: + case eCarNodes::DOOR_LF: + case eCarNodes::DOOR_LR: + { + collisionType = eCarComponentCollisionTypes::COL_NODE_DOOR; + break; + } + case eCarNodes::BUMP_FRONT: + case eCarNodes::BUMP_REAR: + case eCarNodes::WHEEL_LM: + case eCarNodes::WHEEL_RM: + { + collisionType = eCarComponentCollisionTypes::COL_NODE_BUMPER; + break; + } + case eCarNodes::BOOT: + case eCarNodes::CHASSIS: + { + collisionType = eCarComponentCollisionTypes::COL_NODE_BOOT; + break; + } + case eCarNodes::BONNET: + case eCarNodes::WINDSCREEN: + { + collisionType = eCarComponentCollisionTypes::COL_NODE_BONNET; + break; + } + default: + { + collisionType = eCarComponentCollisionTypes::COL_NODE_PANEL; + break; + } + } + } + + return vehicle->SpawnFlyingComponent(partNodeIndex, collisionType, removalTime.value_or(-1)); +} diff --git a/Client/mods/deathmatch/logic/luadefs/CLuaVehicleDefs.h b/Client/mods/deathmatch/logic/luadefs/CLuaVehicleDefs.h index 5c2e908d58..28c2f5e372 100644 --- a/Client/mods/deathmatch/logic/luadefs/CLuaVehicleDefs.h +++ b/Client/mods/deathmatch/logic/luadefs/CLuaVehicleDefs.h @@ -179,4 +179,6 @@ class CLuaVehicleDefs : public CLuaDefs LUA_DECLARE(SetVehicleComponentVisible); LUA_DECLARE(GetVehicleComponentVisible); LUA_DECLARE(GetVehicleComponents); + + static bool SpawnVehicleFlyingComponent(CClientVehicle* const vehicle, std::uint8_t nodeIndex, std::optional componentCollisionType, std::optional removalTime); }; diff --git a/Client/mods/deathmatch/logic/rpc/CVehicleRPCs.cpp b/Client/mods/deathmatch/logic/rpc/CVehicleRPCs.cpp index be586965db..7915c2c7d4 100644 --- a/Client/mods/deathmatch/logic/rpc/CVehicleRPCs.cpp +++ b/Client/mods/deathmatch/logic/rpc/CVehicleRPCs.cpp @@ -52,6 +52,7 @@ void CVehicleRPCs::LoadFunctions() AddHandler(REMOVE_VEHICLE_SIRENS, RemoveVehicleSirens, "removeVehicleSirens"); AddHandler(SET_VEHICLE_SIRENS, SetVehicleSirens, "setVehicleSirens"); AddHandler(SET_VEHICLE_PLATE_TEXT, SetVehiclePlateText, "setVehiclePlateText"); + AddHandler(SPAWN_VEHICLE_FLYING_COMPONENT, SpawnVehicleFlyingComponent, "spawnVehicleFlyingComponent"); } void CVehicleRPCs::DestroyAllVehicles(NetBitStreamInterface& bitStream) @@ -653,3 +654,16 @@ void CVehicleRPCs::SetVehiclePlateText(CClientEntity* pSourceEntity, NetBitStrea } } } + +void CVehicleRPCs::SpawnVehicleFlyingComponent(CClientEntity* const sourceEntity, NetBitStreamInterface& bitStream) +{ + CClientVehicle* vehicle = m_pVehicleManager->Get(sourceEntity->GetID()); + if (!vehicle) + return; + + std::uint8_t nodeIndex, collisionType; + std::int32_t removalTime; + + if (bitStream.Read(nodeIndex) && bitStream.Read(collisionType) && bitStream.Read(removalTime)) + vehicle->SpawnFlyingComponent(static_cast(nodeIndex), static_cast(collisionType), removalTime); +} diff --git a/Client/mods/deathmatch/logic/rpc/CVehicleRPCs.h b/Client/mods/deathmatch/logic/rpc/CVehicleRPCs.h index e63d609fdf..6d4e9f5d19 100644 --- a/Client/mods/deathmatch/logic/rpc/CVehicleRPCs.h +++ b/Client/mods/deathmatch/logic/rpc/CVehicleRPCs.h @@ -57,4 +57,5 @@ class CVehicleRPCs : public CRPCFunctions DECLARE_ELEMENT_RPC(RemoveVehicleSirens); DECLARE_ELEMENT_RPC(SetVehicleSirens); DECLARE_ELEMENT_RPC(SetVehiclePlateText); + DECLARE_ELEMENT_RPC(SpawnVehicleFlyingComponent); }; diff --git a/Client/sdk/game/CDamageManager.h b/Client/sdk/game/CDamageManager.h index 81fda71267..9c4fcc2348 100644 --- a/Client/sdk/game/CDamageManager.h +++ b/Client/sdk/game/CDamageManager.h @@ -121,6 +121,49 @@ enum eLights MAX_LIGHTS // MUST BE 16 OR LESS }; +enum class eCarNodes +{ + NONE = 0, + CHASSIS, + WHEEL_RF, + WHEEL_RM, + WHEEL_RB, + WHEEL_LF, + WHEEL_LM, + WHEEL_LB, + DOOR_RF, + DOOR_RR, + DOOR_LF, + DOOR_LR, + BUMP_FRONT, + BUMP_REAR, + WING_RF, + WING_LF, + BONNET, + BOOT, + WINDSCREEN, + EXHAUST, + MISC_A, + MISC_B, + MISC_C, + MISC_D, + MISC_E, + + NUM_NODES +}; + +enum class eCarComponentCollisionTypes +{ + COL_NODE_BUMPER = 0, + COL_NODE_WHEEL, + COL_NODE_DOOR, + COL_NODE_BONNET, + COL_NODE_BOOT, + COL_NODE_PANEL, + + COL_NODES_NUM +}; + class CDamageManager { public: diff --git a/Client/sdk/game/CVehicle.h b/Client/sdk/game/CVehicle.h index 356fe40470..a5a4f1cdd4 100644 --- a/Client/sdk/game/CVehicle.h +++ b/Client/sdk/game/CVehicle.h @@ -264,7 +264,7 @@ class CVehicle : public virtual CPhysical virtual SColor GetHeadLightColor() = 0; virtual void SetHeadLightColor(const SColor color) = 0; - virtual CObject* SpawnFlyingComponent(int i_1, unsigned int ui_2) = 0; + virtual bool SpawnFlyingComponent(const eCarNodes& nodeIndex, const eCarComponentCollisionTypes& collisionType, std::int32_t removalTime = -1) = 0; virtual void SetWheelVisibility(eWheelPosition wheel, bool bVisible) = 0; virtual CVector GetWheelPosition(eWheelPosition wheel) = 0; diff --git a/Server/mods/deathmatch/logic/CPerfStat.RPCPacketUsage.cpp b/Server/mods/deathmatch/logic/CPerfStat.RPCPacketUsage.cpp index 6a0604b65b..fd4bd0b8bc 100644 --- a/Server/mods/deathmatch/logic/CPerfStat.RPCPacketUsage.cpp +++ b/Server/mods/deathmatch/logic/CPerfStat.RPCPacketUsage.cpp @@ -230,6 +230,7 @@ ADD_ENUM1(SET_MARKER_TARGET_ARROW_PROPERTIES) ADD_ENUM1(RESPAWN_OBJECT) ADD_ENUM1(TOGGLE_OBJECT_RESPAWN) ADD_ENUM1(RESET_WORLD_PROPERTIES) +ADD_ENUM1(SPAWN_VEHICLE_FLYING_COMPONENT) IMPLEMENT_ENUM_END("eElementRPCFunctions") DECLARE_ENUM(CRPCFunctions::eRPCFunctions); diff --git a/Server/mods/deathmatch/logic/CStaticFunctionDefinitions.cpp b/Server/mods/deathmatch/logic/CStaticFunctionDefinitions.cpp index ad06e54a70..67764f8057 100644 --- a/Server/mods/deathmatch/logic/CStaticFunctionDefinitions.cpp +++ b/Server/mods/deathmatch/logic/CStaticFunctionDefinitions.cpp @@ -12488,3 +12488,14 @@ bool CStaticFunctionDefinitions::SetColPolygonHeight(CColPolygon* pColPolygon, f return false; } + +bool CStaticFunctionDefinitions::SpawnVehicleFlyingComponent(CVehicle* const vehicle, std::uint8_t nodeIndex, std::uint8_t collisionType, std::int32_t removalTime) +{ + CBitStream bitStream; + bitStream.pBitStream->Write(nodeIndex); + bitStream.pBitStream->Write(collisionType); + bitStream.pBitStream->Write(removalTime); + m_pPlayerManager->BroadcastOnlyJoined(CElementRPCPacket(vehicle, SPAWN_VEHICLE_FLYING_COMPONENT, *bitStream.pBitStream)); + + return true; +} diff --git a/Server/mods/deathmatch/logic/CStaticFunctionDefinitions.h b/Server/mods/deathmatch/logic/CStaticFunctionDefinitions.h index bb0e99c0ee..dd6202208f 100644 --- a/Server/mods/deathmatch/logic/CStaticFunctionDefinitions.h +++ b/Server/mods/deathmatch/logic/CStaticFunctionDefinitions.h @@ -241,6 +241,7 @@ class CStaticFunctionDefinitions // Vehicle create/destroy functions static CVehicle* CreateVehicle(CResource* pResource, unsigned short usModel, const CVector& vecPosition, const CVector& vecRotation, const char* szRegPlate, unsigned char ucVariant, unsigned char ucVariant2, bool bSynced); + static bool SpawnVehicleFlyingComponent(CVehicle* const vehicle, std::uint8_t nodeIndex, std::uint8_t collisionType, std::int32_t removalTime = -1); // Vehicle get functions static bool GetVehicleVariant(CVehicle* pVehicle, unsigned char& ucVariant, unsigned char& ucVariant2); diff --git a/Server/mods/deathmatch/logic/CVehicle.h b/Server/mods/deathmatch/logic/CVehicle.h index 10de01e625..d5dbb43243 100644 --- a/Server/mods/deathmatch/logic/CVehicle.h +++ b/Server/mods/deathmatch/logic/CVehicle.h @@ -111,6 +111,49 @@ enum eVehicleType VEHICLE_TRAILER }; +enum class eCarNodes +{ + NONE = 0, + CHASSIS, + WHEEL_RF, + WHEEL_RM, + WHEEL_RB, + WHEEL_LF, + WHEEL_LM, + WHEEL_LB, + DOOR_RF, + DOOR_RR, + DOOR_LF, + DOOR_LR, + BUMP_FRONT, + BUMP_REAR, + WING_RF, + WING_LF, + BONNET, + BOOT, + WINDSCREEN, + EXHAUST, + MISC_A, + MISC_B, + MISC_C, + MISC_D, + MISC_E, + + NUM_NODES +}; + +enum class eCarComponentCollisionTypes +{ + COL_NODE_BUMPER = 0, + COL_NODE_WHEEL, + COL_NODE_DOOR, + COL_NODE_BONNET, + COL_NODE_BOOT, + COL_NODE_PANEL, + + COL_NODES_NUM +}; + #define SIREN_TYPE_FIRST 1 #define SIREN_TYPE_LAST 6 #define SIREN_ID_MAX 7 diff --git a/Server/mods/deathmatch/logic/luadefs/CLuaVehicleDefs.cpp b/Server/mods/deathmatch/logic/luadefs/CLuaVehicleDefs.cpp index 294ea7310c..d34d8fe579 100644 --- a/Server/mods/deathmatch/logic/luadefs/CLuaVehicleDefs.cpp +++ b/Server/mods/deathmatch/logic/luadefs/CLuaVehicleDefs.cpp @@ -22,6 +22,7 @@ void CLuaVehicleDefs::LoadFunctions() constexpr static const std::pair functions[]{ // Vehicle create/destroy funcs {"createVehicle", CreateVehicle}, + {"spawnVehicleFlyingComponent", ArgumentParser}, // Vehicle get funcs {"getVehicleType", GetVehicleType}, @@ -241,6 +242,7 @@ void CLuaVehicleDefs::AddClass(lua_State* luaVM) // lua_classfunction(luaVM, "setTrack", "setTrainTrack"); lua_classfunction(luaVM, "setTrainPosition", "setTrainPosition"); lua_classfunction(luaVM, "setTrainSpeed", "setTrainSpeed"); // Reduce confusion + lua_classfunction(luaVM, "spawnFlyingComponent", "spawnVehicleFlyingComponent"); lua_classvariable(luaVM, "damageProof", "setVehicleDamageProof", "isVehicleDamageProof"); lua_classvariable(luaVM, "locked", "setVehicleLocked", "isVehicleLocked"); @@ -2982,3 +2984,65 @@ int CLuaVehicleDefs::SetVehiclePlateText(lua_State* luaVM) lua_pushboolean(luaVM, false); return 1; } + +bool CLuaVehicleDefs::SpawnVehicleFlyingComponent(CVehicle* const vehicle, std::uint8_t nodeIndex, std::optional componentCollisionType, std::optional removalTime) +{ + auto partNodeIndex = static_cast(nodeIndex); + auto collisionType = componentCollisionType.has_value() ? static_cast(componentCollisionType.value()) : eCarComponentCollisionTypes::COL_NODE_PANEL; + + if (nodeIndex < 1 || partNodeIndex >= eCarNodes::NUM_NODES) + throw std::invalid_argument("Invalid component index"); + + if (collisionType >= eCarComponentCollisionTypes::COL_NODES_NUM) + throw std::invalid_argument("Invalid collision type index"); + + if (!componentCollisionType.has_value()) + { + switch (partNodeIndex) + { + case eCarNodes::WHEEL_RF: + case eCarNodes::WHEEL_RB: + case eCarNodes::WHEEL_LF: + case eCarNodes::WHEEL_LB: + { + collisionType = eCarComponentCollisionTypes::COL_NODE_WHEEL; + break; + } + case eCarNodes::DOOR_RF: + case eCarNodes::DOOR_RR: + case eCarNodes::DOOR_LF: + case eCarNodes::DOOR_LR: + { + collisionType = eCarComponentCollisionTypes::COL_NODE_DOOR; + break; + } + case eCarNodes::BUMP_FRONT: + case eCarNodes::BUMP_REAR: + case eCarNodes::WHEEL_LM: + case eCarNodes::WHEEL_RM: + { + collisionType = eCarComponentCollisionTypes::COL_NODE_BUMPER; + break; + } + case eCarNodes::BOOT: + case eCarNodes::CHASSIS: + { + collisionType = eCarComponentCollisionTypes::COL_NODE_BOOT; + break; + } + case eCarNodes::BONNET: + case eCarNodes::WINDSCREEN: + { + collisionType = eCarComponentCollisionTypes::COL_NODE_BONNET; + break; + } + default: + { + collisionType = eCarComponentCollisionTypes::COL_NODE_PANEL; + break; + } + } + } + + return CStaticFunctionDefinitions::SpawnVehicleFlyingComponent(vehicle, nodeIndex, static_cast(collisionType), removalTime.value_or(-1)); +} diff --git a/Server/mods/deathmatch/logic/luadefs/CLuaVehicleDefs.h b/Server/mods/deathmatch/logic/luadefs/CLuaVehicleDefs.h index 3200e2ada3..b349736113 100644 --- a/Server/mods/deathmatch/logic/luadefs/CLuaVehicleDefs.h +++ b/Server/mods/deathmatch/logic/luadefs/CLuaVehicleDefs.h @@ -125,4 +125,6 @@ class CLuaVehicleDefs : public CLuaDefs LUA_DECLARE(GetVehicleSirens); LUA_DECLARE(GetVehicleSirenParams); LUA_DECLARE(SetVehiclePlateText); + + static bool SpawnVehicleFlyingComponent(CVehicle* const vehicle, std::uint8_t nodeIndex, std::optional componentCollisionType, std::optional removalTime); }; diff --git a/Shared/sdk/net/rpc_enums.h b/Shared/sdk/net/rpc_enums.h index 6f63818b46..2318908f4e 100644 --- a/Shared/sdk/net/rpc_enums.h +++ b/Shared/sdk/net/rpc_enums.h @@ -288,5 +288,7 @@ enum eElementRPCFunctions RESET_WORLD_PROPERTIES, + SPAWN_VEHICLE_FLYING_COMPONENT, + NUM_RPC_FUNCS // Add above this line }; From 2318836b00cb7af03c3df0679fcefa33b6743caf Mon Sep 17 00:00:00 2001 From: Shady <68560906+shadylua@users.noreply.github.com> Date: Tue, 8 Oct 2024 05:28:35 +0300 Subject: [PATCH 14/15] Remove duplicate user names in CNickGen.cpp (#3777) * Update CNickGen.cpp * Apply clang-format --------- Co-authored-by: Uladzislau Nikalayevich --- Client/core/CNickGen.cpp | 340 +++++++++++++++++++-------------------- 1 file changed, 169 insertions(+), 171 deletions(-) diff --git a/Client/core/CNickGen.cpp b/Client/core/CNickGen.cpp index 13f38c470b..a4cb2738e2 100644 --- a/Client/core/CNickGen.cpp +++ b/Client/core/CNickGen.cpp @@ -22,180 +22,178 @@ const char* const CNickGen::m_szAdjectives[] = { "Awake", "Aware", "Awesome", "Awful", "Axiomatic", "Bad", "Barbarous", "Bashful", "Bawdy", "Beautiful", "Befitting", "Beneficial", "Bent", "Berserk", "Best", "Better", "Bewildered", "Big", "Billowy", "Bite-sized", "Bitter", "Bizarre", "Black", "Bloody", "Blue", "Blue-eyed", "Blushing", "Boiling", "Boorish", "Bored", "Boring", "Bouncy", "Boundless", - "Brainy", "Brash", "Brave", "Brawny", "Breakable", "Breezy", "Brief", "Bright", "Bright", "Broad", "Broken", - "Brown", "Bumpy", "Burly", "Bustling", "Busy", "Cagey", "Callous", "Calm", "Capable", "Capricious", "Careful", - "Careless", "Caring", "Cautious", "Ceaseless", "Certain", "Changeable", "Charming", "Cheap", "Cheerful", "Chemical", "Chief", - "Childlike", "Chilly", "Chivalrous", "Chubby", "Chunky", "Clammy", "Classy", "Clean", "Clear", "Clever", "Cloistered", - "Cloudy", "Closed", "Clumsy", "Cluttered", "Coherent", "Cold", "Colorful", "Colossal", "Combative", "Common", "Complete", - "Complex", "Concerned", "Condemned", "Confused", "Conscious", "Cooing", "Cool", "Courageous", "Cowardly", "Crabby", "Craven", - "Crazy", "Creepy", "Crooked", "Crowded", "Cruel", "Cuddly", "Cultured", "Cumbersome", "Curious", "Curly", "Curved", - "Curvy", "Cut", "Cute", "Cynical", "Daffy", "Daily", "Damaged", "Damaging", "Damp", "Dangerous", "Dapper", - "Dark", "Dashing", "Dazzling", "Dead", "Deadpan", "Deafening", "Dear", "Debonair", "Decisive", "Decorous", "Deep", - "Deeply", "Defeated", "Defective", "Defiant", "Delicate", "Delicious", "Delightful", "Demonic", "Delirious", "Dependent", "Depressed", - "Deranged", "Deserted", "Detailed", "Determined", "Devilish", "Didactic", "Different", "Difficult", "Diligent", "Direful", "Dirty", - "Disastrous", "Discreet", "Disgusted", "Disgusting", "Distinct", "Disturbed", "Divergent", "Dizzy", "Doubtful", "Drab", "Draconian", - "Dramatic", "Dreary", "Drunk", "Dry", "Dull", "Dusty", "Dusty", "Dynamic", "Eager", "Early", "Earthy", - "Easy", "Eatable", "Economic", "Educated", "Efficient", "Eight", "Elastic", "Elated", "Elderly", "Electric", "Elegant", - "Elfin", "Elite", "Eminent", "Empty", "Enchanted", "Enchanting", "Endurable", "Energetic", "Enormous", "Envious", "Equable", - "Equal", "Erect", "Erratic", "Ethereal", "Evanescent", "Evasive", "Even", "Excellent", "Excited", "Exciting", "Exclusive", - "Exotic", "Expensive", "Exuberant", "Exultant", "Fabulous", "Faded", "Faint", "Fair", "Faithful", "Fallacious", "False", - "Familiar", "Famous", "Fanatical", "Fancy", "Fantastic", "Far", "Far-flung", "Fascinated", "Fast", "Fat", "Faulty", - "Fearful", "Fearless", "Feeble", "Feigned", "Female", "Fertile", "Festive", "Few", "Fierce", "Filthy", "Fine", - "Finicky", "First", "Five", "Fixed", "Flagrant", "Flaky", "Flashy", "Flat", "Flawless", "Flimsy", "Flippant", - "Flowery", "Fluffy", "Fluttering", "Foamy", "Foolish", "Foregoing", "Forgetful", "Fortunate", "Four", "Frail", "Fragile", - "Frantic", "Free", "Freezing", "Frequent", "Fresh", "Fretful", "Friendly", "Frightened", "Full", "Fumbling", "Functional", - "Funny", "Furry", "Furtive", "Future", "Futuristic", "Fuzzy", "Gabby", "Gainful", "Gamy", "Gaping", "Garrulous", - "Gaudy", "General", "Gentle", "Giant", "Giddy", "Gifted", "Gigantic", "Glamorous", "Gleaming", "Glib", "Glistening", - "Glorious", "Glossy", "Godly", "Good", "Goofy", "Gorgeous", "Graceful", "Grandiose", "Grateful", "Gratis", "Gray", - "Greasy", "Great", "Greedy", "Green", "Grey", "Grieving", "Groovy", "Grotesque", "Grouchy", "Grubby", "Gruesome", - "Grumpy", "Guarded", "Guiltless", "Gullible", "Gusty", "Guttural", "Habitual", "Half", "Hallowed", "Halting", "Handsome", - "Handsomely", "Handy", "Hanging", "Hapless", "Happy", "Hard", "Harmonious", "Harsh", "Hateful", "Heady", "Healthy", - "Heavenly", "Heavy", "Hellish", "Helpful", "Helpless", "Hesitant", "Hideous", "High", "Hilarious", "Hissing", "Historical", - "Holistic", "Hollow", "Homeless", "Homely", "Honorable", "Horrible", "Hospitable", "Hot", "Huge", "Hulking", "Humdrum", - "Humorous", "Hungry", "Hurried", "Hurt", "Hushed", "Husky", "Hypnotic", "Hysterical", "Icky", "Icy", "Idiotic", - "Ignorant", "Ill", "Illegal", "Ill-fated", "Imaginary", "Immense", "Imminent", "Impartial", "Imperfect", "Impolite", "Important", - "Imported", "Impossible", "Incredible", "Infamous", "Innate", "Innocent", "Insidious", "Internal", "Invincible", "Irate", "Irritating", - "Itchy", "Jaded", "Jagged", "Jazzy", "Jealous", "Jittery", "Jobless", "Jolly", "Joyous", "Judicious", "Juicy", - "Jumbled", "Jumpy", "Juvenile", "Kaput", "Keen", "Kind", "Kindly", "Knotty", "Knowing", "Known", "Labored", - "Lacking", "Lame", "Lamentable", "Languid", "Large", "Last", "Late", "Laughable", "Lavish", "Lazy", "Lean", - "Learned", "Left", "Legal", "Lethal", "Level", "Lewd", "Light", "Like", "Likeable", "Limping", "Literate", - "Little", "Lively", "Lively", "Living", "Lonely", "Long", "Longing", "Long-term", "Loose", "Lopsided", "Loud", - "Loutish", "Lovely", "Loving", "Low", "Lowly", "Lucky", "Ludicrous", "Lumpy", "Lush", "Luxuriant", "Lying", - "Lyrical", "Macabre", "Macho", "Maddening", "Madly", "Magenta", "Magical", "Majestic", "Makeshift", "Male", "Malicious", - "Mammoth", "Maniacal", "Many", "Marked", "Massive", "Married", "Marvelous", "Material", "Mature", "Mean", "Measly", - "Meaty", "Medical", "Meek", "Mellow", "Melodic", "Melted", "Merciful", "Mere", "Messy", "Mighty", "Military", - "Milky", "Mindless", "Miniature", "Minor", "Miscreant", "Misty", "Mixed", "Moaning", "Modern", "Moldy", "Momentous", - "Motionless", "Muddled", "Mundane", "Murky", "Mushy", "Mute", "Mysterious", "Naive", "Nappy", "Narrow", "Nasty", - "Natural", "Naughty", "Nauseating", "Near", "Neat", "Nebulous", "Necessary", "Needless", "Needy", "Neighborly", "Nervous", - "New", "Next", "Nice", "Nifty", "Nimble", "Nine", "Nippy", "Noiseless", "Noisy", "Nonchalant", "Nonstop", - "Normal", "Nostalgic", "Nosy", "Noxious", "Null", "Numberless", "Numerous", "Nutritious", "Nutty", "Oafish", "Obedient", - "Obeisant", "Obese", "Obnoxious", "Obscene", "Obsequious", "Observant", "Obsolete", "Obtainable", "Oceanic", "Odd", "Offbeat", - "Old", "Omniscient", "One", "Onerous", "Open", "Opposite", "Optimal", "Orange", "Ordinary", "Organic", "Ossified", - "Outgoing", "Outrageous", "Oval", "Overjoyed", "Overrated", "Overt", "Painful", "Pale", "Paltry", "Panicky", "Panoramic", - "Parallel", "Parched", "Past", "Pastoral", "Pathetic", "Peaceful", "Penitent", "Perfect", "Periodic", "Perpetual", "Petite", - "Petite", "Phobic", "Physical", "Picayune", "Pink", "Piquant", "Placid", "Plain", "Plant", "Plastic", "Plausible", - "Pleasant", "Plucky", "Pointless", "Poised", "Polite", "Political", "Poor", "Possessive", "Possible", "Powerful", "Precious", - "Premium", "Present", "Pretty", "Previous", "Pricey", "Prickly", "Private", "Probable", "Productive", "Profuse", "Protective", - "Proud", "Psychotic", "Public", "Puffy", "Pumped", "Puny", "Purple", "Purring", "Pushy", "Puzzled", "Puzzling", - "Quack", "Quaint", "Quick", "Quickest", "Quiet", "Quirky", "Quixotic", "Quizzical", "Rabid", "Racial", "Ragged", - "Rainy", "Rampant", "Rapid", "Rare", "Raspy", "Ratty", "Ready", "Real", "Rebel", "Receptive", "Recondite", - "Red", "Redundant", "Reflective", "Regular", "Relieved", "Remarkable", "Repulsive", "Resolute", "Resonant", "Rhetorical", "Rich", - "Right", "Righteous", "Rightful", "Rigid", "Ripe", "Ritzy", "Roasted", "Robust", "Romantic", "Roomy", "Rotten", - "Rough", "Round", "Royal", "Ruddy", "Rude", "Rural", "Rustic", "Ruthless", "Sable", "Sad", "Safe", - "Salty", "Same", "Sassy", "Satisfying", "Savory", "Scandalous", "Scarce", "Scared", "Scary", "Scattered", "Scientific", - "Scrawny", "Screeching", "Second", "Secret", "Secretive", "Sedate", "Seemly", "Selective", "Selfish", "Separate", "Serious", - "Shaggy", "Shaky", "Shallow", "Sharp", "Shiny", "Shivering", "Shocking", "Short", "Shrill", "Shut", "Shy", - "Sick", "Silent", "Silent", "Silky", "Silly", "Simple", "Simplistic", "Sincere", "Six", "Skillful", "Skinny", - "Sleepy", "Slim", "Slimy", "Slippery", "Sloppy", "Slow", "Small", "Smart", "Smelly", "Smiling", "Smoggy", - "Smooth", "Sneaky", "Snobbish", "Snotty", "Soft", "Soggy", "Solid", "Somber", "Sordid", "Sore", "Sore", - "Sour", "Sparkling", "Special", "Spicy", "Spiffy", "Spiky", "Spiritual", "Spiteful", "Splendid", "Spooky", "Spotless", - "Spotted", "Spotty", "Spurious", "Squalid", "Square", "Squealing", "Squeamish", "Staking", "Stale", "Standing", "Statuesque", - "Steadfast", "Steady", "Stealthy", "Steep", "Sticky", "Stiff", "Stingy", "Stormy", "Straight", "Strange", "Striped", - "Strong", "Stupendous", "Stupid", "Sturdy", "Subdued", "Subsequent", "Successful", "Succinct", "Sudden", "Sulky", "Super", - "Superb", "Supreme", "Swanky", "Sweet", "Sweltering", "Swift", "Synonymous", "Taboo", "Tacit", "Tacky", "Talented", - "Tall", "Tame", "Tan", "Tangible", "Tangy", "Tart", "Tasteful", "Tasteless", "Tasty", "Tawdry", "Tearful", - "Tedious", "Teeny", "Teeny-tiny", "Telling", "Temporary", "Ten", "Tender", "Tense", "Tense", "Tenuous", "Terrible", - "Terrific", "Tested", "Testy", "Thankful", "Thick", "Thin", "Thinkable", "Third", "Thirsty", "Thirsty", "Thoughtful", - "Three", "Thundering", "Tidy", "Tight", "Tiny", "Tired", "Tiresome", "Toothsome", "Torpid", "Tough", "Towering", - "Tranquil", "Trashy", "Tremendous", "Tricky", "Trite", "Troubled", "Truculent", "True", "Truthful", "Two", "Typical", - "Ubiquitous", "Ugliest", "Ugly", "Ultra", "Unable", "Unadvised", "Unarmed", "Unbecoming", "Unbiased", "Uncovered", "Understood", - "Unequal", "Unequaled", "Uneven", "Unhealthy", "Unique", "Unkempt", "Unknown", "Unnatural", "Unruly", "Unsightly", "Unsuitable", - "Untidy", "Unused", "Unusual", "Unwieldy", "Unwritten", "Upbeat", "Uppity", "Upset", "Uptight", "Used", "Useful", - "Useless", "Utopian", "Utter", "Uttermost", "Vacuous", "Vagabond", "Vague", "Valuable", "Various", "Vast", "Vengeful", - "Venomous", "Verdant", "Versed", "Victorious", "Vigorous", "Violent", "Violet", "Vivacious", "Voiceless", "Volatile", "Voracious", - "Vulgar", "Wacky", "Waggish", "Waiting", "Wakeful", "Wandering", "Wanting", "Warlike", "Warm", "Wary", "Wasteful", - "Watery", "Weak", "Wealthy", "Weary", "Well-made", "Well-off", "Well-to-do", "Wet", "Whimsical", "Whispering", "White", - "Whole", "Wholesale", "Wicked", "Wide", "Wide-eyed", "Wiggly", "Wild", "Willing", "Windy", "Wiry", "Wise", - "Wistful", "Witty", "Woebegone", "Womanly", "Wonderful", "Wooden", "Woozy", "Workable", "Worried", "Worthless", "Wrathful", - "Wretched", "Wrong", "Wry", + "Brainy", "Brash", "Brave", "Brawny", "Breakable", "Breezy", "Brief", "Bright", "Broad", "Broken", "Brown", + "Bumpy", "Burly", "Bustling", "Busy", "Cagey", "Callous", "Calm", "Capable", "Capricious", "Careful", "Careless", + "Caring", "Cautious", "Ceaseless", "Certain", "Changeable", "Charming", "Cheap", "Cheerful", "Chemical", "Chief", "Childlike", + "Chilly", "Chivalrous", "Chubby", "Chunky", "Clammy", "Classy", "Clean", "Clear", "Clever", "Cloistered", "Cloudy", + "Closed", "Clumsy", "Cluttered", "Coherent", "Cold", "Colorful", "Colossal", "Combative", "Common", "Complete", "Complex", + "Concerned", "Condemned", "Confused", "Conscious", "Cooing", "Cool", "Courageous", "Cowardly", "Crabby", "Craven", "Crazy", + "Creepy", "Crooked", "Crowded", "Cruel", "Cuddly", "Cultured", "Cumbersome", "Curious", "Curly", "Curved", "Curvy", + "Cut", "Cute", "Cynical", "Daffy", "Daily", "Damaged", "Damaging", "Damp", "Dangerous", "Dapper", "Dark", + "Dashing", "Dazzling", "Dead", "Deadpan", "Deafening", "Dear", "Debonair", "Decisive", "Decorous", "Deep", "Deeply", + "Defeated", "Defective", "Defiant", "Delicate", "Delicious", "Delightful", "Demonic", "Delirious", "Dependent", "Depressed", "Deranged", + "Deserted", "Detailed", "Determined", "Devilish", "Didactic", "Different", "Difficult", "Diligent", "Direful", "Dirty", "Disastrous", + "Discreet", "Disgusted", "Disgusting", "Distinct", "Disturbed", "Divergent", "Dizzy", "Doubtful", "Drab", "Draconian", "Dramatic", + "Dreary", "Drunk", "Dry", "Dull", "Dusty", "Dynamic", "Eager", "Early", "Earthy", "Easy", "Eatable", + "Economic", "Educated", "Efficient", "Eight", "Elastic", "Elated", "Elderly", "Electric", "Elegant", "Elfin", "Elite", + "Eminent", "Empty", "Enchanted", "Enchanting", "Endurable", "Energetic", "Enormous", "Envious", "Equable", "Equal", "Erect", + "Erratic", "Ethereal", "Evanescent", "Evasive", "Even", "Excellent", "Excited", "Exciting", "Exclusive", "Exotic", "Expensive", + "Exuberant", "Exultant", "Fabulous", "Faded", "Faint", "Fair", "Faithful", "Fallacious", "False", "Familiar", "Famous", + "Fanatical", "Fancy", "Fantastic", "Far", "Far-flung", "Fascinated", "Fast", "Fat", "Faulty", "Fearful", "Fearless", + "Feeble", "Feigned", "Female", "Fertile", "Festive", "Few", "Fierce", "Filthy", "Fine", "Finicky", "First", + "Five", "Fixed", "Flagrant", "Flaky", "Flashy", "Flat", "Flawless", "Flimsy", "Flippant", "Flowery", "Fluffy", + "Fluttering", "Foamy", "Foolish", "Foregoing", "Forgetful", "Fortunate", "Four", "Frail", "Fragile", "Frantic", "Free", + "Freezing", "Frequent", "Fresh", "Fretful", "Friendly", "Frightened", "Full", "Fumbling", "Functional", "Funny", "Furry", + "Furtive", "Future", "Futuristic", "Fuzzy", "Gabby", "Gainful", "Gamy", "Gaping", "Garrulous", "Gaudy", "General", + "Gentle", "Giant", "Giddy", "Gifted", "Gigantic", "Glamorous", "Gleaming", "Glib", "Glistening", "Glorious", "Glossy", + "Godly", "Good", "Goofy", "Gorgeous", "Graceful", "Grandiose", "Grateful", "Gratis", "Gray", "Greasy", "Great", + "Greedy", "Green", "Grey", "Grieving", "Groovy", "Grotesque", "Grouchy", "Grubby", "Gruesome", "Grumpy", "Guarded", + "Guiltless", "Gullible", "Gusty", "Guttural", "Habitual", "Half", "Hallowed", "Halting", "Handsome", "Handsomely", "Handy", + "Hanging", "Hapless", "Happy", "Hard", "Harmonious", "Harsh", "Hateful", "Heady", "Healthy", "Heavenly", "Heavy", + "Hellish", "Helpful", "Helpless", "Hesitant", "Hideous", "High", "Hilarious", "Hissing", "Historical", "Holistic", "Hollow", + "Homeless", "Homely", "Honorable", "Horrible", "Hospitable", "Hot", "Huge", "Hulking", "Humdrum", "Humorous", "Hungry", + "Hurried", "Hurt", "Hushed", "Husky", "Hypnotic", "Hysterical", "Icky", "Icy", "Idiotic", "Ignorant", "Ill", + "Illegal", "Ill-fated", "Imaginary", "Immense", "Imminent", "Impartial", "Imperfect", "Impolite", "Important", "Imported", "Impossible", + "Incredible", "Infamous", "Innate", "Innocent", "Insidious", "Internal", "Invincible", "Irate", "Irritating", "Itchy", "Jaded", + "Jagged", "Jazzy", "Jealous", "Jittery", "Jobless", "Jolly", "Joyous", "Judicious", "Juicy", "Jumbled", "Jumpy", + "Juvenile", "Kaput", "Keen", "Kind", "Kindly", "Knotty", "Knowing", "Known", "Labored", "Lacking", "Lame", + "Lamentable", "Languid", "Large", "Last", "Late", "Laughable", "Lavish", "Lazy", "Lean", "Learned", "Left", + "Legal", "Lethal", "Level", "Lewd", "Light", "Like", "Likeable", "Limping", "Literate", "Little", "Lively", + "Living", "Lonely", "Long", "Longing", "Long-term", "Loose", "Lopsided", "Loud", "Loutish", "Lovely", "Loving", + "Low", "Lowly", "Lucky", "Ludicrous", "Lumpy", "Lush", "Luxuriant", "Lying", "Lyrical", "Macabre", "Macho", + "Maddening", "Madly", "Magenta", "Magical", "Majestic", "Makeshift", "Male", "Malicious", "Mammoth", "Maniacal", "Many", + "Marked", "Massive", "Married", "Marvelous", "Material", "Mature", "Mean", "Measly", "Meaty", "Medical", "Meek", + "Mellow", "Melodic", "Melted", "Merciful", "Mere", "Messy", "Mighty", "Military", "Milky", "Mindless", "Miniature", + "Minor", "Miscreant", "Misty", "Mixed", "Moaning", "Modern", "Moldy", "Momentous", "Motionless", "Muddled", "Mundane", + "Murky", "Mushy", "Mute", "Mysterious", "Naive", "Nappy", "Narrow", "Nasty", "Natural", "Naughty", "Nauseating", + "Near", "Neat", "Nebulous", "Necessary", "Needless", "Needy", "Neighborly", "Nervous", "New", "Next", "Nice", + "Nifty", "Nimble", "Nine", "Nippy", "Noiseless", "Noisy", "Nonchalant", "Nonstop", "Normal", "Nostalgic", "Nosy", + "Noxious", "Null", "Numberless", "Numerous", "Nutritious", "Nutty", "Oafish", "Obedient", "Obeisant", "Obese", "Obnoxious", + "Obscene", "Obsequious", "Observant", "Obsolete", "Obtainable", "Oceanic", "Odd", "Offbeat", "Old", "Omniscient", "One", + "Onerous", "Open", "Opposite", "Optimal", "Orange", "Ordinary", "Organic", "Ossified", "Outgoing", "Outrageous", "Oval", + "Overjoyed", "Overrated", "Overt", "Painful", "Pale", "Paltry", "Panicky", "Panoramic", "Parallel", "Parched", "Past", + "Pastoral", "Pathetic", "Peaceful", "Penitent", "Perfect", "Periodic", "Perpetual", "Petite", "Phobic", "Physical", "Picayune", + "Pink", "Piquant", "Placid", "Plain", "Plant", "Plastic", "Plausible", "Pleasant", "Plucky", "Pointless", "Poised", + "Polite", "Political", "Poor", "Possessive", "Possible", "Powerful", "Precious", "Premium", "Present", "Pretty", "Previous", + "Pricey", "Prickly", "Private", "Probable", "Productive", "Profuse", "Protective", "Proud", "Psychotic", "Public", "Puffy", + "Pumped", "Puny", "Purple", "Purring", "Pushy", "Puzzled", "Puzzling", "Quack", "Quaint", "Quick", "Quickest", + "Quiet", "Quirky", "Quixotic", "Quizzical", "Rabid", "Racial", "Ragged", "Rainy", "Rampant", "Rapid", "Rare", + "Raspy", "Ratty", "Ready", "Real", "Rebel", "Receptive", "Recondite", "Red", "Redundant", "Reflective", "Regular", + "Relieved", "Remarkable", "Repulsive", "Resolute", "Resonant", "Rhetorical", "Rich", "Right", "Righteous", "Rightful", "Rigid", + "Ripe", "Ritzy", "Roasted", "Robust", "Romantic", "Roomy", "Rotten", "Rough", "Round", "Royal", "Ruddy", + "Rude", "Rural", "Rustic", "Ruthless", "Sable", "Sad", "Safe", "Salty", "Same", "Sassy", "Satisfying", + "Savory", "Scandalous", "Scarce", "Scared", "Scary", "Scattered", "Scientific", "Scrawny", "Screeching", "Second", "Secret", + "Secretive", "Sedate", "Seemly", "Selective", "Selfish", "Separate", "Serious", "Shaggy", "Shaky", "Shallow", "Sharp", + "Shiny", "Shivering", "Shocking", "Short", "Shrill", "Shut", "Shy", "Sick", "Silent", "Silky", "Silly", + "Simple", "Simplistic", "Sincere", "Six", "Skillful", "Skinny", "Sleepy", "Slim", "Slimy", "Slippery", "Sloppy", + "Slow", "Small", "Smart", "Smelly", "Smiling", "Smoggy", "Smooth", "Sneaky", "Snobbish", "Snotty", "Soft", + "Soggy", "Solid", "Somber", "Sordid", "Sore", "Sour", "Sparkling", "Special", "Spicy", "Spiffy", "Spiky", + "Spiritual", "Spiteful", "Splendid", "Spooky", "Spotless", "Spotted", "Spotty", "Spurious", "Squalid", "Square", "Squealing", + "Squeamish", "Staking", "Stale", "Standing", "Statuesque", "Steadfast", "Steady", "Stealthy", "Steep", "Sticky", "Stiff", + "Stingy", "Stormy", "Straight", "Strange", "Striped", "Strong", "Stupendous", "Stupid", "Sturdy", "Subdued", "Subsequent", + "Successful", "Succinct", "Sudden", "Sulky", "Super", "Superb", "Supreme", "Swanky", "Sweet", "Sweltering", "Swift", + "Synonymous", "Taboo", "Tacit", "Tacky", "Talented", "Tall", "Tame", "Tan", "Tangible", "Tangy", "Tart", + "Tasteful", "Tasteless", "Tasty", "Tawdry", "Tearful", "Tedious", "Teeny", "Teeny-tiny", "Telling", "Temporary", "Ten", + "Tender", "Tense", "Tenuous", "Terrible", "Terrific", "Tested", "Testy", "Thankful", "Thick", "Thin", "Thinkable", + "Third", "Thirsty", "Thoughtful", "Three", "Thundering", "Tidy", "Tight", "Tiny", "Tired", "Tiresome", "Toothsome", + "Torpid", "Tough", "Towering", "Tranquil", "Trashy", "Tremendous", "Tricky", "Trite", "Troubled", "Truculent", "True", + "Truthful", "Two", "Typical", "Ubiquitous", "Ugliest", "Ugly", "Ultra", "Unable", "Unadvised", "Unarmed", "Unbecoming", + "Unbiased", "Uncovered", "Understood", "Unequal", "Unequaled", "Uneven", "Unhealthy", "Unique", "Unkempt", "Unknown", "Unnatural", + "Unruly", "Unsightly", "Unsuitable", "Untidy", "Unused", "Unusual", "Unwieldy", "Unwritten", "Upbeat", "Uppity", "Upset", + "Uptight", "Used", "Useful", "Useless", "Utopian", "Utter", "Uttermost", "Vacuous", "Vagabond", "Vague", "Valuable", + "Various", "Vast", "Vengeful", "Venomous", "Verdant", "Versed", "Victorious", "Vigorous", "Violent", "Violet", "Vivacious", + "Voiceless", "Volatile", "Voracious", "Vulgar", "Wacky", "Waggish", "Waiting", "Wakeful", "Wandering", "Wanting", "Warlike", + "Warm", "Wary", "Wasteful", "Watery", "Weak", "Wealthy", "Weary", "Well-made", "Well-off", "Well-to-do", "Wet", + "Whimsical", "Whispering", "White", "Whole", "Wholesale", "Wicked", "Wide", "Wide-eyed", "Wiggly", "Wild", "Willing", + "Windy", "Wiry", "Wise", "Wistful", "Witty", "Woebegone", "Womanly", "Wonderful", "Wooden", "Woozy", "Workable", + "Worried", "Worthless", "Wrathful", "Wretched", "Wrong", "Wry", }; const char* const CNickGen::m_szNouns[] = { - "Aardvark", "Buffalo", "Alligator", "Ant", "Anteater", "Antelope", "Ape", "Armadillo", "Donkey", "Baboon", "Badger", - "Barracuda", "Bat", "Bear", "Beaver", "Bee", "Bison", "Boar", "Bush", "Butterfly", "Camel", "Calf", - "Cat", "Kitten", "Cattle", "Chamois", "Cheetah", "Chicken", "Chick", "Chimpanzee", "Infant", "Empress", "Troop", - "Cobra", "Cockroach", "Cormorant", "Cougar", "Coyote", "Crab", "Crane", "Crocodile", "Crow", "Deer", "Dog", - "Dogfish", "Dolphin", "Donkey", "Dove", "Dragonfly", "Duck", "Dugong", "Eagle", "Eaglet", "Echidna", "Eel", - "Eland", "Elephant", "Elk", "Falcon", "Ferret", "Finch", "Fly", "Fox", "Frog", "Gaur", "Gazelle", - "Gerbil", "Giant", "Giraffe", "Gnu", "Goat", "Goose", "Gorilla", "Guanaco", "Guinea", "Guineapig", "Gull", - "Hamster", "Hare", "Hawk", "Hedgehog", "Heron", "Hornet", "Horse", "Human", "Hyena", "Iguana", "Jackal", - "Jaguar", "Jellyfish", "Kangaroo", "Koala", "Komodo", "Kouprey", "Kudu", "Lark", "Lemur", "Leopard", "Lion", - "Llama", "Loris", "Louse", "Lobster", "Lyrebird", "Magpie", "Mallard", "Manatee", "Meerkat", "Mink", "Mole", - "Monkey", "Moose", "Mouse", "Mosquito", "Mule", "Okapi", "Oryx", "Ostrich", "Otter", "Owl", "Ox", - "Oyster", "Panther", "Partridge", "Peafowl", "Pelican", "Penguin", "Pig", "Pigeon", "Pony", "Porcupine", "Quelea", - "Rabbit", "Bunny", "Raccoon", "Rail", "Ram", "Rat", "Raven", "Reindeer", "Rhino", "Salamander", "Sealion", - "Seal", "Seahorse", "Seastar", "Shark", "Sheep", "Shrew", "Skunk", "Snail", "Snake", "Spider", "Squid", - "Squirrel", "Stinkbug", "Swan", "Tapir", "Tarsier", "Tiger", "Toad", "Turkey", "Turtle", "Vicuna", "Walrus", - "Wasp", "Weasel", "Whale", "Wolf", "Worm", "Yak", "Zebra", "Hat", "Cap", "Beret", "Astrakhan", - "Beanie", "Hardhat", "Pillbox", "Monkeycap", "Operahat", "Bonnet", "Bowler", "Coonskin", "Fedora", "Derby", "Montero", - "Cowboyhat", "Sombrero", "Yarmulke", "Skullcap", "Tam", "Sunbonnet", "Toque", "Tophat", "Babushka", "Balaclava", "Turban", - "Diadem", "Earmuffs", "Visor", "Scarf", "Veil", "Warbonnet", "Pithhelmet", "Hood", "Miter", "Butter", "Icecream", - "Cakebatter", "Coffee", "Tea", "Soda", "Beer", "Wine", "Cappuccino", "Jell-o", "Nougats", "Lambchops", "Steaks", - "Chowder", "Fishsoup", "Spaghetti", "Lobster", "Sushi", "Fondue", "Crabslegs", "Shrimp", "Garlic", "Onions", "Bratwurst", - "Kielbasa", "Hotdog", "Hamburger", "Herbs", "Grains", "Legumes", "Zampone", "Casserole", "Beans", "Seeds", "Stew", - "Cereal", "Polenta", "Pudding", "Pasta", "Macaroni", "Ravioli", "Wafer", "Crackers", "Cookies", "Sandwich", "Gyro", - "Wrap", "Omelet", "Popcorn", "Walnuts", "Nuts", "Almonds", "Pizza", "Mousse", "Brulee", "Cakes", "Pancake", - "Waffles", "Toast", "Candy", "Pie", "Senator", "Governor", "Councilman", "Detective", "Sleuth", "Trooper", "Musician", - "Maestro", "Conductor", "Composer", "Singer", "Architect", "Physician", "Manager", "Usher", "Painter", "Model", "Designer", - "Guest", "Attorney", "Lawyer", "Judge", "Mayor", "Therapist", "Teacher", "Principal", "Professor", "Orator", "Man", - "Woman", "Teen", "Child", "Mother", "Father", "Sister", "Brother", "Uncle", "Aunt", "Son", "Daughter", - "In-laws", "Boy", "Girl", "Nurse", "Sibling", "Settler", "Pioneer", "Waiter", "Hostess", "Host", "Cashier", - "Attendant", "Publisher", "Agent", "Witch", "Warlock", "Ghost", "Knight", "Prince", "Princess", "Maiden", "Godmother", - "Fairy", "Petal", "Sepal", "Stamen", "Pineboughs", "Bud", "Branch", "Blossom", "Fruit", "Bloom", "Tree", - "Maple", "Elm", "Oak", "Palm", "Baobab", "Mangrove", "Cyprus", "Pine", "Dogwood", "Alder", "Flowers", - "Rose", "Tulip", "Cyclamen", "Lily", "Carnations", "Wisteria", "Flytrap", "Hoe", "Weeds", "Plants", "Canes", - "Palms", "Fruit", "Apple", "Lemon", "Orange", "Grapefruit", "Tangerine", "Peach", "Tomato", "Banana", "Vegetables", - "Artichokes", "Leeks", "Lettuce", "Eggplants", "Zucchini", "Squash", "Pumpkin", "Cabbage", "Pepper", "Onion", "Garlic", - "Poison", "Venom", "Fire", "Ship", "Ferryboat", "Oceanliner", "Oars", "Sails", "Dinghy", "Yacht", "Canoe", - "Catamaran", "Gondola", "Boat", "Battleship", "Clipper", "Dhow", "Flatboat", "Houseboat", "Galleon", "Frigate", "Hydrofoil", - "Junk", "Ketch", "Yawl", "Submarine", "Schooner", "Scow", "Flatbed", "Suv", "Van", "Caboose", "Train", - "Bullet", "Metro", "Subway", "Cart", "Taxi", "Car", "Racingcar", "Buggy", "Dunebuggy", "Dragster", "Motorcycle", - "Gokart", "Limo", "Stretch", "Wagon", "Trolley", "Tram", "Bus", "Parachute", "Tractor", "Trailer", "Golfkart", - "Jeep", "Bigrig", "Bulldozer", "Dumptruck", "Jeep", "Towtruck", "Engine", "Fireengine", "Policecar", "Tank", "Locomotive", - "Ocean", "Oasis", "Sea", "Lake", "Saltlake", "Seafoam", "Waves", "Bubbles", "Current", "Waterbasin", "Bridge", - "Harbor", "Pond", "Wharf", "Pier", "Dock", "Port", "Shore", "Beach", "Sandbar", "Coast", "River", - "Brook", "Rivulet", "Puddle", "Waterfall", "Cascades", "Canal", "Channel", "Stream", "Creek", "Marsh", "Bog", - "Swamp", "Bayou", "Estuary", "Whirlpool", "Eddy", "Geyser", "Well", "Monsoon", "Hurricane", "Typhoon", "Air", - "Snow", "Rain", "Sleet", "Storm", "Hail", "Blizzard", "Wind", "Breeze", "Gale", "Whirlwind", "Maelstrom", - "Duststorm", "Cloudburst", "Tornado", "Twister", "Clouds", "Fog", "Peasoup", "Floods", "Flashflood", "Acidrain", "Tremors", - "Lightning", "Avalanche", "Eclipse", "Alpenglow", "Tsunami", "Waterspout", "Smog", "Aneroid", "Barometer", "Radiosonde", "Station", - "Map", "Chalice", "Bijou", "Candelabra", "Menorah", "Curio", "Figurine", "Music-box", "Objetd'art", "Trinket", "Trims", - "Windchimes", "Birdcage", "Birdbath", "Cans", "Urn", "Bucket", "Arrow", "Bow", "Sword", "Dart", "Epee", - "Dagger", "Hatchet", "Pickax", "Dolls", "Broom", "Mop", "Pail", "Squeegee", "Caddy", "Telephone", "Pipe", - "Paints", "Brushes", "Easel", "Canvas", "Trunk", "Hook", "Gun", "Glue", "Tissue", "Toilet", "Kleenex", - "Papertowel", "Ropes", "Rubber", "Coil", "Toys", "Dogleash", "Balloon", "Vases", "Planters", "Pen", "Pad", - "Typewriter", "Computer", "Laptop", "Netbook", "Stylus", "Pencil", "Desk", "Backpack", "Shoerack", "Notebook", "Vellum", - "Chalk", "Badge", "Saddle", "Spurs", "Paper", "Rollbook", "Guestbook", "Pot", "Pen", "Plate", "Dishes", - "Fork", "Spoons", "Knives", "Knife", "Samovar", "Sky", "Forest", "Heaven", "Hell", "Earth", "Sun", - "Star", "Planet", "Mercury", "Venus", "Earth", "Mars", "Jupiter", "Saturn", "Uranus", "Neptune", "Ceres", - "Pluto", "Haumea", "Makemake", "Eris", "Outerspace", "Town", "Village", "City", "Country", "Farm", "Suburb", - "Roads", "Streets", "Blocks", "Zoo", "Park", "Museum", "Cemetery", "Tunnels", "Caves", "Churches", "Temples", - "Mall", "Dresser", "Armoire", "Chiffonier", "Credenza", "Console", "Bookcase", "Buffet", "Armchair", "Recliner", "Easychair", - "Bench", "Banquette", "Chair", "Couch", "Davenport", "Sofa", "Armchair", "Ottoman", "Deckchair", "Loveseat", "Highseat", - "Divan", "Inglenook", "Pew", "Throne", "Sectional", "Stool", "Pottychair", "Workbench", "Nighttable", "Bed", "Daybed", - "Bassinet", "Crib", "Cradle", "Cot", "Futon", "Hammock", "Tatamimat", "Waterbed", "Trundlebed", "Hassock", "Hatrack", - "Stepstool", "Footrest", "Footstool", "Tripod", "Mirror", "Nightlight", "Torchiere", "Sunlamp", "Spotlight", "Ceilingfan", "Cupboard", - "Cardtable", "Hutch", "Locker", "Wetbar", "Vanity", "Rack", "Hopechest", "Sculpture", "Painting", "Eye", "Pupil", - "Iris", "Retina", "Eyeball", "Eyelids", "Eyelashes", "Eyebrows", "Lap", "Waist", "Belly", "Tummy", "Rearend", - "Crotch", "Abdomen", "Beard", "Mustache", "Sideburns", "Fingernail", "Hand", "Forearm", "Arm", "Knuckles", "Thumb", - "Wrist", "Elbow", "Leg", "Toes", "Knee", "Ankle", "Shin", "Thigh", "Hip", "Breast", "Chest", - "Torso", "Tongue", "Lips", "Gums", "Mouth", "Teeth", "Bones", "Spine", "Throat", "Lungs", "Kidneys", - "Intestines", "Colon", "Spleen", "Glands", "Blood", "Head", "Skull", "Brain", "Muscle", "Hair", "Xylophone", - "Clavier", "Virginal", "Lute", "Drum", "Frenchhorn", "Piano", "Violin", "Cello", "Guitar", "Flute", "Tuba", - "Harp", "Mariachi", "Orchestra", "Oboe", "Bassoon", "Woodwinds", "Brass", "Viola", "Kettledrum", "Peyotedrum", "Tambourine", - "Tambour", "Xylophone", "Saxophone", "Marimba", "Maracas", "Shofar", "Cymbals", "Kazoo", "Dulcimer", "Accordion", "Lyre", - "Fiddle", "Banjo", "Balalaika", "Sitar", "Ukulele", "Zither", "Bagpipes", "Piccolo", "Clarinet", "Cornet", "Panpipe", - "Tuningfork", "Metronome", "Castanets", "Woofer", "Sniper", "Marksman", "Cleaner", "Pyro", "Attacker", "Mechanic", "Janitor", - "Scrubber", "Garbageman", "Technician", "Ninja", "Medic", "Spy", "Assassin", "Gunman", "Triggerman", "Butcher", "Killer", - "Dodger", "Booger", "Mechanic", "Engineer", "Doctor", "Surgeon", "Fighter", "Shooter", "Gunner", "Soldier", "Officer", - "Veteran", "Scout", "Mercenary", "Commando", "Cadet", "Guard", "Warrior", "Trooper", "Gambler", "Specialist", "Shaper", - "Finisher", "Gladiator", "Boxer", "Wrestler", "Warlord", "Rival", "Armory", "Agent", "Rebel", "Brawler", "Bruiser", - "Bully", "Champion", "Hero", "Battler", "Combatant", "Fencer", "Swordsman", "Expert", "Gangster", "Gangsta", "Bandit", - "Hoodlum", "Mobster", "Robber", "Thief", "Burglar", "Pirate", "Thug", "Hitman", "Hitperson", "Dealer", "Desperado", - "Criminal", "Crook", "Hijacker", "Carjacker", "Villain", "Convict", "Fugitive", "Mug", "Outlaw", "Ruffian", "Cutthroat", - "Devil", "Murderer", "Psycho", "Punk", "ASBO", "Offender", "Drifter", "Rioter", "Goon", "Roughneck", "Brute", - "Hacker", "Cabbie", "Wheeler", "Driver", "Rider", "Cyclist", "Cowboy", "Operative", "Carrier", "Transporter", "Trucker", - "Conductor", "Wheelman", "Vampire", "Parasite", "Tramp", "Bum", "Hobo", "Hitchhiker", "Deadbeat", "Acrobat", + "Aardvark", "Buffalo", "Alligator", "Ant", "Anteater", "Antelope", "Ape", "Armadillo", "Donkey", "Baboon", "Badger", + "Barracuda", "Bat", "Bear", "Beaver", "Bee", "Bison", "Boar", "Bush", "Butterfly", "Camel", "Calf", + "Cat", "Kitten", "Cattle", "Chamois", "Cheetah", "Chicken", "Chick", "Chimpanzee", "Infant", "Empress", "Troop", + "Cobra", "Cockroach", "Cormorant", "Cougar", "Coyote", "Crab", "Crane", "Crocodile", "Crow", "Deer", "Dog", + "Dogfish", "Dolphin", "Dove", "Dragonfly", "Duck", "Dugong", "Eagle", "Eaglet", "Echidna", "Eel", "Eland", + "Elephant", "Elk", "Falcon", "Ferret", "Finch", "Fly", "Fox", "Frog", "Gaur", "Gazelle", "Gerbil", + "Giant", "Giraffe", "Gnu", "Goat", "Goose", "Gorilla", "Guanaco", "Guinea", "Guineapig", "Gull", "Hamster", + "Hare", "Hawk", "Hedgehog", "Heron", "Hornet", "Horse", "Human", "Hyena", "Iguana", "Jackal", "Jaguar", + "Jellyfish", "Kangaroo", "Koala", "Komodo", "Kouprey", "Kudu", "Lark", "Lemur", "Leopard", "Lion", "Llama", + "Loris", "Louse", "Lobster", "Lyrebird", "Magpie", "Mallard", "Manatee", "Meerkat", "Mink", "Mole", "Monkey", + "Moose", "Mouse", "Mosquito", "Mule", "Okapi", "Oryx", "Ostrich", "Otter", "Owl", "Ox", "Oyster", + "Panther", "Partridge", "Peafowl", "Pelican", "Penguin", "Pig", "Pigeon", "Pony", "Porcupine", "Quelea", "Rabbit", + "Bunny", "Raccoon", "Rail", "Ram", "Rat", "Raven", "Reindeer", "Rhino", "Salamander", "Sealion", "Seal", + "Seahorse", "Seastar", "Shark", "Sheep", "Shrew", "Skunk", "Snail", "Snake", "Spider", "Squid", "Squirrel", + "Stinkbug", "Swan", "Tapir", "Tarsier", "Tiger", "Toad", "Turkey", "Turtle", "Vicuna", "Walrus", "Wasp", + "Weasel", "Whale", "Wolf", "Worm", "Yak", "Zebra", "Hat", "Cap", "Beret", "Astrakhan", "Beanie", + "Hardhat", "Pillbox", "Monkeycap", "Operahat", "Bonnet", "Bowler", "Coonskin", "Fedora", "Derby", "Montero", "Cowboyhat", + "Sombrero", "Yarmulke", "Skullcap", "Tam", "Sunbonnet", "Toque", "Tophat", "Babushka", "Balaclava", "Turban", "Diadem", + "Earmuffs", "Visor", "Scarf", "Veil", "Warbonnet", "Pithhelmet", "Hood", "Miter", "Butter", "Icecream", "Cakebatter", + "Coffee", "Tea", "Soda", "Beer", "Wine", "Cappuccino", "Jell-o", "Nougats", "Lambchops", "Steaks", "Chowder", + "Fishsoup", "Spaghetti", "Sushi", "Fondue", "Crabslegs", "Shrimp", "Onions", "Bratwurst", "Kielbasa", "Hotdog", "Hamburger", + "Herbs", "Grains", "Legumes", "Zampone", "Casserole", "Beans", "Seeds", "Stew", "Cereal", "Polenta", "Pudding", + "Pasta", "Macaroni", "Ravioli", "Wafer", "Crackers", "Cookies", "Sandwich", "Gyro", "Wrap", "Omelet", "Popcorn", + "Walnuts", "Nuts", "Almonds", "Pizza", "Mousse", "Brulee", "Cakes", "Pancake", "Waffles", "Toast", "Candy", + "Pie", "Senator", "Governor", "Councilman", "Detective", "Sleuth", "Musician", "Maestro", "Conductor", "Composer", "Singer", + "Architect", "Physician", "Manager", "Usher", "Painter", "Model", "Designer", "Guest", "Attorney", "Lawyer", "Judge", + "Mayor", "Therapist", "Teacher", "Principal", "Professor", "Orator", "Man", "Woman", "Teen", "Child", "Mother", + "Father", "Sister", "Brother", "Uncle", "Aunt", "Son", "Daughter", "In-laws", "Boy", "Girl", "Nurse", + "Sibling", "Settler", "Pioneer", "Waiter", "Hostess", "Host", "Cashier", "Attendant", "Publisher", "Witch", "Warlock", + "Ghost", "Knight", "Prince", "Princess", "Maiden", "Godmother", "Fairy", "Petal", "Sepal", "Stamen", "Pineboughs", + "Bud", "Branch", "Blossom", "Fruit", "Bloom", "Tree", "Maple", "Elm", "Oak", "Palm", "Baobab", + "Mangrove", "Cyprus", "Pine", "Dogwood", "Alder", "Flowers", "Rose", "Tulip", "Cyclamen", "Lily", "Carnations", + "Wisteria", "Flytrap", "Hoe", "Weeds", "Plants", "Canes", "Palms", "Apple", "Lemon", "Orange", "Grapefruit", + "Tangerine", "Peach", "Tomato", "Banana", "Vegetables", "Artichokes", "Leeks", "Lettuce", "Eggplants", "Zucchini", "Squash", + "Pumpkin", "Cabbage", "Pepper", "Onion", "Garlic", "Poison", "Venom", "Fire", "Ship", "Ferryboat", "Oceanliner", + "Oars", "Sails", "Dinghy", "Yacht", "Canoe", "Catamaran", "Gondola", "Boat", "Battleship", "Clipper", "Dhow", + "Flatboat", "Houseboat", "Galleon", "Frigate", "Hydrofoil", "Junk", "Ketch", "Yawl", "Submarine", "Schooner", "Scow", + "Flatbed", "Suv", "Van", "Caboose", "Train", "Bullet", "Metro", "Subway", "Cart", "Taxi", "Car", + "Racingcar", "Buggy", "Dunebuggy", "Dragster", "Motorcycle", "Gokart", "Limo", "Stretch", "Wagon", "Trolley", "Tram", + "Bus", "Parachute", "Tractor", "Trailer", "Golfkart", "Jeep", "Bigrig", "Bulldozer", "Dumptruck", "Towtruck", "Engine", + "Fireengine", "Policecar", "Tank", "Locomotive", "Ocean", "Oasis", "Sea", "Lake", "Saltlake", "Seafoam", "Waves", + "Bubbles", "Current", "Waterbasin", "Bridge", "Harbor", "Pond", "Wharf", "Pier", "Dock", "Port", "Shore", + "Beach", "Sandbar", "Coast", "River", "Brook", "Rivulet", "Puddle", "Waterfall", "Cascades", "Canal", "Channel", + "Stream", "Creek", "Marsh", "Bog", "Swamp", "Bayou", "Estuary", "Whirlpool", "Eddy", "Geyser", "Well", + "Monsoon", "Hurricane", "Typhoon", "Air", "Snow", "Rain", "Sleet", "Storm", "Hail", "Blizzard", "Wind", + "Breeze", "Gale", "Whirlwind", "Maelstrom", "Duststorm", "Cloudburst", "Tornado", "Twister", "Clouds", "Fog", "Peasoup", + "Floods", "Flashflood", "Acidrain", "Tremors", "Lightning", "Avalanche", "Eclipse", "Alpenglow", "Tsunami", "Waterspout", "Smog", + "Aneroid", "Barometer", "Radiosonde", "Station", "Map", "Chalice", "Bijou", "Candelabra", "Menorah", "Curio", "Figurine", + "Music-box", "Objetd'art", "Trinket", "Trims", "Windchimes", "Birdcage", "Birdbath", "Cans", "Urn", "Bucket", "Arrow", + "Bow", "Sword", "Dart", "Epee", "Dagger", "Hatchet", "Pickax", "Dolls", "Broom", "Mop", "Pail", + "Squeegee", "Caddy", "Telephone", "Pipe", "Paints", "Brushes", "Easel", "Canvas", "Trunk", "Hook", "Gun", + "Glue", "Tissue", "Toilet", "Kleenex", "Papertowel", "Ropes", "Rubber", "Coil", "Toys", "Dogleash", "Balloon", + "Vases", "Planters", "Pen", "Pad", "Typewriter", "Computer", "Laptop", "Netbook", "Stylus", "Pencil", "Desk", + "Backpack", "Shoerack", "Notebook", "Vellum", "Chalk", "Badge", "Saddle", "Spurs", "Paper", "Rollbook", "Guestbook", + "Pot", "Plate", "Dishes", "Fork", "Spoons", "Knives", "Knife", "Samovar", "Sky", "Forest", "Heaven", + "Hell", "Earth", "Sun", "Star", "Planet", "Mercury", "Venus", "Mars", "Jupiter", "Saturn", "Uranus", + "Neptune", "Ceres", "Pluto", "Haumea", "Makemake", "Eris", "Outerspace", "Town", "Village", "City", "Country", + "Farm", "Suburb", "Roads", "Streets", "Blocks", "Zoo", "Park", "Museum", "Cemetery", "Tunnels", "Caves", + "Churches", "Temples", "Mall", "Dresser", "Armoire", "Chiffonier", "Credenza", "Console", "Bookcase", "Buffet", "Armchair", + "Recliner", "Easychair", "Bench", "Banquette", "Chair", "Couch", "Davenport", "Sofa", "Ottoman", "Deckchair", "Loveseat", + "Highseat", "Divan", "Inglenook", "Pew", "Throne", "Sectional", "Stool", "Pottychair", "Workbench", "Nighttable", "Bed", + "Daybed", "Bassinet", "Crib", "Cradle", "Cot", "Futon", "Hammock", "Tatamimat", "Waterbed", "Trundlebed", "Hassock", + "Hatrack", "Stepstool", "Footrest", "Footstool", "Tripod", "Mirror", "Nightlight", "Torchiere", "Sunlamp", "Spotlight", "Ceilingfan", + "Cupboard", "Cardtable", "Hutch", "Locker", "Wetbar", "Vanity", "Rack", "Hopechest", "Sculpture", "Painting", "Eye", + "Pupil", "Iris", "Retina", "Eyeball", "Eyelids", "Eyelashes", "Eyebrows", "Lap", "Waist", "Belly", "Tummy", + "Rearend", "Crotch", "Abdomen", "Beard", "Mustache", "Sideburns", "Fingernail", "Hand", "Forearm", "Arm", "Knuckles", + "Thumb", "Wrist", "Elbow", "Leg", "Toes", "Knee", "Ankle", "Shin", "Thigh", "Hip", "Breast", + "Chest", "Torso", "Tongue", "Lips", "Gums", "Mouth", "Teeth", "Bones", "Spine", "Throat", "Lungs", + "Kidneys", "Intestines", "Colon", "Spleen", "Glands", "Blood", "Head", "Skull", "Brain", "Muscle", "Hair", + "Xylophone", "Clavier", "Virginal", "Lute", "Drum", "Frenchhorn", "Piano", "Violin", "Cello", "Guitar", "Flute", + "Tuba", "Harp", "Mariachi", "Orchestra", "Oboe", "Bassoon", "Woodwinds", "Brass", "Viola", "Kettledrum", "Peyotedrum", + "Tambourine", "Tambour", "Saxophone", "Marimba", "Maracas", "Shofar", "Cymbals", "Kazoo", "Dulcimer", "Accordion", "Lyre", + "Fiddle", "Banjo", "Balalaika", "Sitar", "Ukulele", "Zither", "Bagpipes", "Piccolo", "Clarinet", "Cornet", "Panpipe", + "Tuningfork", "Metronome", "Castanets", "Woofer", "Sniper", "Marksman", "Cleaner", "Pyro", "Attacker", "Mechanic", "Janitor", + "Scrubber", "Garbageman", "Technician", "Ninja", "Medic", "Spy", "Assassin", "Gunman", "Triggerman", "Butcher", "Killer", + "Dodger", "Booger", "Engineer", "Doctor", "Surgeon", "Fighter", "Shooter", "Gunner", "Soldier", "Officer", "Veteran", + "Scout", "Mercenary", "Commando", "Cadet", "Guard", "Warrior", "Trooper", "Gambler", "Specialist", "Shaper", "Finisher", + "Gladiator", "Boxer", "Wrestler", "Warlord", "Rival", "Armory", "Agent", "Rebel", "Brawler", "Bruiser", "Bully", + "Champion", "Hero", "Battler", "Combatant", "Fencer", "Swordsman", "Expert", "Gangster", "Gangsta", "Bandit", "Hoodlum", + "Mobster", "Robber", "Thief", "Burglar", "Pirate", "Thug", "Hitman", "Hitperson", "Dealer", "Desperado", "Criminal", + "Crook", "Hijacker", "Carjacker", "Villain", "Convict", "Fugitive", "Mug", "Outlaw", "Ruffian", "Cutthroat", "Devil", + "Murderer", "Psycho", "Punk", "ASBO", "Offender", "Drifter", "Rioter", "Goon", "Roughneck", "Brute", "Hacker", + "Cabbie", "Wheeler", "Driver", "Rider", "Cyclist", "Cowboy", "Operative", "Carrier", "Transporter", "Trucker", "Wheelman", + "Vampire", "Parasite", "Tramp", "Bum", "Hobo", "Hitchhiker", "Deadbeat", "Acrobat", }; SString CNickGen::GetRandomNickname() From 78f6d669adc97c51a825250dd4dbf1a4a4a0ff15 Mon Sep 17 00:00:00 2001 From: FileEX Date: Tue, 8 Oct 2024 16:49:29 +0200 Subject: [PATCH 15/15] Fix #3770 Glob pattern in meta.xml should exclude meta.xml (#3779) Update CResource.cpp --- Server/mods/deathmatch/logic/CResource.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Server/mods/deathmatch/logic/CResource.cpp b/Server/mods/deathmatch/logic/CResource.cpp index 759c6288da..3dcf147c39 100644 --- a/Server/mods/deathmatch/logic/CResource.cpp +++ b/Server/mods/deathmatch/logic/CResource.cpp @@ -1371,6 +1371,9 @@ std::vector CResource::GetFilePaths(const char* szFilename) std::string strPath = std::filesystem::relative(path, strDirectory).string(); ReplaceSlashes(strPath); + if (strPath == "meta.xml") + continue; + vecFiles.push_back(std::move(strPath)); }