From 1439d5fa0324680fd1ebb0508faaab21cd1eb320 Mon Sep 17 00:00:00 2001 From: momo5502 Date: Sat, 12 Nov 2016 20:06:02 +0100 Subject: [PATCH] [Maps] Support for some tropical maps This adds support for favela and estate tropical More investigation is needed for crash tropical. --- src/Components/Modules/Maps.cpp | 14 +++++++++++++- src/Game/Structs.hpp | 4 +++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/Components/Modules/Maps.cpp b/src/Components/Modules/Maps.cpp index 0c83c05d..ad1cb40f 100644 --- a/src/Components/Modules/Maps.cpp +++ b/src/Components/Modules/Maps.cpp @@ -109,7 +109,7 @@ namespace Components if (type == Game::XAssetType::ASSET_TYPE_WEAPON) { - if (!strstr(name.data(), "_mp") && name != "none" && name != "destructible_car") + if ((!strstr(name.data(), "_mp") && name != "none" && name != "destructible_car") || Zones::Version() >= VERSION_ALPHA2) { *restrict = true; return; @@ -152,6 +152,12 @@ namespace Components *restrict = true; return; } + + if (type == Game::XAssetType::ASSET_TYPE_VEHICLE && Zones::Version() >= VERSION_ALPHA2) + { + *restrict = true; + return; + } } Game::GameMap_Data* Maps::GetWorldData() @@ -196,6 +202,12 @@ namespace Components mapname = "mp_shipment_long"; } + // Redirect crash tropical + if (mapname == "mp_crash_trop"s) + { + mapname = "mp_crash_tropical"; + } + _snprintf_s(buffer, size, size, format, mapname); } diff --git a/src/Game/Structs.hpp b/src/Game/Structs.hpp index 2c7570a9..25ddc485 100644 --- a/src/Game/Structs.hpp +++ b/src/Game/Structs.hpp @@ -2319,7 +2319,9 @@ namespace Game struct VehicleDef { const char* name; - char pad[716]; + char pad[408]; + void* weaponDef; + char pad2[304]; }; struct XModelDrawInfo