From fc26c283623be321568e6cebe0a4290d6866df6a Mon Sep 17 00:00:00 2001 From: LWSS Date: Sat, 5 Aug 2023 05:58:39 -0700 Subject: [PATCH] tweak(gta-net-five): ignore automobile types for now --- .../gta-net-five/src/netSyncTree.cpp | 26 ++++++++++--------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/code/components/gta-net-five/src/netSyncTree.cpp b/code/components/gta-net-five/src/netSyncTree.cpp index 66662d71ca..c063f856e4 100644 --- a/code/components/gta-net-five/src/netSyncTree.cpp +++ b/code/components/gta-net-five/src/netSyncTree.cpp @@ -85,6 +85,7 @@ static uint32_t GetModelType(uint32_t hash) uint32_t vehicleType = *(uint32_t*)(((uint8_t*)archetype) + 0x340); return vehicleType; } + return -2; } return -1; } @@ -110,18 +111,19 @@ static bool CVehicleCreationDataNode__CanApply(void* thisptr, rage::netObject* n *(uint32_t*)(uintptr_t(thisptr) + 200) = 0x107F392C; } } - if (netObj->GetObjectType() == (uint16_t)NetObjEntityType::Automobile) - { - if (modelType != VEHICLE_TYPE_CAR - && modelType != VEHICLE_TYPE_SUBMARINECAR - && modelType != VEHICLE_TYPE_QUADBIKE - && modelType != VEHICLE_TYPE_AMPHIBIOUS_AUTOMOBILE - && modelType != VEHICLE_TYPE_AMPHIBIOUS_QUADBIKE) - { - // force to stromberg - *(uint32_t*)(uintptr_t(thisptr) + 200) = 0x34DBA661; - } - } + // There is some usage of the older CREATE_AUTOMOBILE native which triggers this + //if (netObj->GetObjectType() == (uint16_t)NetObjEntityType::Automobile) + //{ + // if (modelType != VEHICLE_TYPE_CAR + // && modelType != VEHICLE_TYPE_SUBMARINECAR + // && modelType != VEHICLE_TYPE_QUADBIKE + // && modelType != VEHICLE_TYPE_AMPHIBIOUS_AUTOMOBILE + // && modelType != VEHICLE_TYPE_AMPHIBIOUS_QUADBIKE) + // { + // // force to stromberg + // *(uint32_t*)(uintptr_t(thisptr) + 200) = 0x34DBA661; + // } + //} if (netObj->GetObjectType() == (uint16_t)NetObjEntityType::Train) { if (modelType != VEHICLE_TYPE_TRAIN)