File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change 1717#include < Utilities/AresHelper.h>
1818#include < Utilities/AresFunctions.h>
1919
20+ #pragma region GetTechnoType
21+
22+ // Avoid secondary jump
23+ DEFINE_JUMP (VTABLE, 0x7E2328 , 0x41C200 ) // AircraftClass_GetTechnoType -> AircraftClass_GetType
24+ DEFINE_JUMP(VTABLE, 0x7E3F40 , 0x459EE0 ) // BuildingClass_GetTechnoType -> BuildingClass_GetType
25+ DEFINE_JUMP(VTABLE, 0x7EB0DC , 0x51FAF0 ) // InfantryClass_GetTechnoType -> InfantryClass_GetType
26+ DEFINE_JUMP(VTABLE, 0x7F5CF4 , 0x741490 ) // UnitClass_GetTechnoType -> UnitClass_GetType
27+
28+ #pragma endregion
29+
2030#pragma region Update
2131
2232// Early, before ObjectClass_AI
Original file line number Diff line number Diff line change @@ -195,10 +195,10 @@ TechnoTypeClass* TechnoTypeExt::GetTechnoType(ObjectTypeClass* pType)
195195 UnitType = 0x7F6218 ,
196196 };
197197 auto const vtThis = static_cast <IUnknownVtbl>(VTable::Get (pType));
198- if (vtThis == IUnknownVtbl::AircraftType ||
199- vtThis == IUnknownVtbl::BuildingType ||
200- vtThis == IUnknownVtbl::InfantryType ||
201- vtThis == IUnknownVtbl::UnitType )
198+ if (vtThis == IUnknownVtbl::InfantryType
199+ || vtThis == IUnknownVtbl::UnitType
200+ || vtThis == IUnknownVtbl::AircraftType
201+ || vtThis == IUnknownVtbl::BuildingType )
202202 {
203203 return static_cast <TechnoTypeClass*>(pType);
204204 }
You can’t perform that action at this time.
0 commit comments