From d2caba561091325affb3f5975e69e92d23620141 Mon Sep 17 00:00:00 2001 From: Noble_Fish <1065703286@qq.com> Date: Thu, 5 Mar 2026 06:00:13 +0800 Subject: [PATCH 1/5] Initial --- src/Ext/WarheadType/Body.cpp | 3 +++ src/Ext/WarheadType/Body.h | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/Ext/WarheadType/Body.cpp b/src/Ext/WarheadType/Body.cpp index 589b162dfa..17df4d53ab 100644 --- a/src/Ext/WarheadType/Body.cpp +++ b/src/Ext/WarheadType/Body.cpp @@ -119,6 +119,9 @@ DamageAreaResult WarheadTypeExt::ExtData::DamageAreaWithTarget(const CoordStruct void WarheadTypeExt::ExtData::LoadFromINIFile(CCINIClass* const pINI) { + if (lastLoadedINI == reinterpret_cast(pINI)) + return; + lastLoadedINI = reinterpret_cast(pINI); auto pThis = this->OwnerObject(); const char* pSection = pThis->ID; INI_EX exINI(pINI); diff --git a/src/Ext/WarheadType/Body.h b/src/Ext/WarheadType/Body.h index 41acdffa76..bad037f0ea 100644 --- a/src/Ext/WarheadType/Body.h +++ b/src/Ext/WarheadType/Body.h @@ -259,6 +259,7 @@ class WarheadTypeExt private: Valueable Shield_Respawn_Rate_InMinutes; Valueable Shield_SelfHealing_Rate_InMinutes; + uintptr_t lastLoadedINI; public: ExtData(WarheadTypeClass* OwnerObject) : Extension(OwnerObject) @@ -496,6 +497,8 @@ class WarheadTypeExt , ApplyPerTargetEffectsOnDetonate {} , Taunt { false } + + , lastLoadedINI { 0 } { } void ApplyConvert(HouseClass* pHouse, TechnoClass* pTarget); From f1f55faf4c74a0ca3635ed2d9d2b8cc110f1a134 Mon Sep 17 00:00:00 2001 From: Noble_Fish <1065703286@qq.com> Date: Sat, 14 Mar 2026 18:00:22 +0800 Subject: [PATCH 2/5] Revert "Initial" This reverts commit d2caba561091325affb3f5975e69e92d23620141. --- src/Ext/WarheadType/Body.cpp | 3 --- src/Ext/WarheadType/Body.h | 3 --- 2 files changed, 6 deletions(-) diff --git a/src/Ext/WarheadType/Body.cpp b/src/Ext/WarheadType/Body.cpp index 17df4d53ab..589b162dfa 100644 --- a/src/Ext/WarheadType/Body.cpp +++ b/src/Ext/WarheadType/Body.cpp @@ -119,9 +119,6 @@ DamageAreaResult WarheadTypeExt::ExtData::DamageAreaWithTarget(const CoordStruct void WarheadTypeExt::ExtData::LoadFromINIFile(CCINIClass* const pINI) { - if (lastLoadedINI == reinterpret_cast(pINI)) - return; - lastLoadedINI = reinterpret_cast(pINI); auto pThis = this->OwnerObject(); const char* pSection = pThis->ID; INI_EX exINI(pINI); diff --git a/src/Ext/WarheadType/Body.h b/src/Ext/WarheadType/Body.h index bad037f0ea..41acdffa76 100644 --- a/src/Ext/WarheadType/Body.h +++ b/src/Ext/WarheadType/Body.h @@ -259,7 +259,6 @@ class WarheadTypeExt private: Valueable Shield_Respawn_Rate_InMinutes; Valueable Shield_SelfHealing_Rate_InMinutes; - uintptr_t lastLoadedINI; public: ExtData(WarheadTypeClass* OwnerObject) : Extension(OwnerObject) @@ -497,8 +496,6 @@ class WarheadTypeExt , ApplyPerTargetEffectsOnDetonate {} , Taunt { false } - - , lastLoadedINI { 0 } { } void ApplyConvert(HouseClass* pHouse, TechnoClass* pTarget); From 7208b226433f22f2d56b2141ad7e6c89aabf88f6 Mon Sep 17 00:00:00 2001 From: Noble_Fish <1065703286@qq.com> Date: Sat, 14 Mar 2026 18:08:58 +0800 Subject: [PATCH 3/5] Hook Co-authored-by: Netsu_Negi <71598172+NetsuNegi@users.noreply.github.com> --- YRpp | 2 +- src/Ext/Rules/Body.cpp | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/YRpp b/YRpp index 6aa702acd4..5bee471bc6 160000 --- a/YRpp +++ b/YRpp @@ -1 +1 @@ -Subproject commit 6aa702acd40d9b166644e4e0b6a3b510130493fc +Subproject commit 5bee471bc629bc3f38b4f6fb8fead9e30e492e73 diff --git a/src/Ext/Rules/Body.cpp b/src/Ext/Rules/Body.cpp index 228b0415ca..6850ce6ee1 100644 --- a/src/Ext/Rules/Body.cpp +++ b/src/Ext/Rules/Body.cpp @@ -860,5 +860,17 @@ DEFINE_HOOK(0x6744E4, RulesClass_ReadJumpjetControls_Extra, 0x7) return 0; } +DEFINE_JUMP(LJMP, 0x66919B, 0x6691B7) // Don't read warhead here! +DEFINE_JUMP(LJMP, 0x668EED, 0x668EF5) // Load types later +DEFINE_HOOK(0x668F6A, RulesClass_Read_File_LoadTypes, 0x5) +{ + GET(RulesClass*, pRules, EDI); + GET(CCINIClass*, pINI, ESI); + + pRules->LoadTypesFromINI(pINI); + + return 0; +} + // skip vanilla JumpjetControls and make it earlier load // DEFINE_JUMP(LJMP, 0x668EB5, 0x668EBD); // RulesClass_Process_SkipJumpjetControls // Really necessary? won't hurt to read again From b37633f18936276a54cfbaecc221588b72e30a38 Mon Sep 17 00:00:00 2001 From: Noble_Fish <1065703286@qq.com> Date: Sat, 14 Mar 2026 19:19:54 +0800 Subject: [PATCH 4/5] Update YRpp --- YRpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/YRpp b/YRpp index 5bee471bc6..f4999a3516 160000 --- a/YRpp +++ b/YRpp @@ -1 +1 @@ -Subproject commit 5bee471bc629bc3f38b4f6fb8fead9e30e492e73 +Subproject commit f4999a3516e440c9f701f087781afd32dca43983 From aa8b8169ef1cddb07ac8f34c2349cc2e73645a71 Mon Sep 17 00:00:00 2001 From: Coronia <2217891145@qq.com> Date: Mon, 16 Mar 2026 10:03:03 +0800 Subject: [PATCH 5/5] update YRpp --- YRpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/YRpp b/YRpp index f4999a3516..00d2b12069 160000 --- a/YRpp +++ b/YRpp @@ -1 +1 @@ -Subproject commit f4999a3516e440c9f701f087781afd32dca43983 +Subproject commit 00d2b12069dacf5bafe39a56c8f19ccad755bf46