From c957f30880d1b05f1210ca7dbfac98435a722e48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=88=AA=E5=91=B3=E9=BA=BB=E9=85=B1?= <93972760+TaranDahl@users.noreply.github.com> Date: Thu, 28 May 2026 18:35:13 +0800 Subject: [PATCH] cn core core update Update YRpp docs update update --- CREDITS.md | 1 + docs/Fixed-or-Improved-Logics.md | 11 +++++++++++ docs/Whats-New.md | 1 + docs/locale/zh_CN/LC_MESSAGES/CREDITS.po | 3 +++ .../LC_MESSAGES/Fixed-or-Improved-Logics.po | 15 +++++++++++++++ docs/locale/zh_CN/LC_MESSAGES/Whats-New.po | 6 ++++++ src/Ext/Unit/Hooks.Firing.cpp | 18 ++++++++++++++++++ src/Ext/WeaponType/Body.cpp | 2 ++ src/Ext/WeaponType/Body.h | 3 +++ 9 files changed, 60 insertions(+) diff --git a/CREDITS.md b/CREDITS.md index f88715bcb3..d730608b45 100644 --- a/CREDITS.md +++ b/CREDITS.md @@ -761,6 +761,7 @@ This page lists all the individual contributions to the project by their author. - Fix an issue that the time for units in the area guard mission to reacquire targets after eliminating the target is significantly longer than that in other missions - Framework for dynamic sight - Fixed voxel projectile and animation lighting issues + - Allow other vehicles to attempt to move above the target like ZEP - **solar-III (凤九歌)** - Target scanning delay customization (documentation) - Skip target scanning function calling for unarmed technos (documentation) diff --git a/docs/Fixed-or-Improved-Logics.md b/docs/Fixed-or-Improved-Logics.md index e87e8d0a93..c776631994 100644 --- a/docs/Fixed-or-Improved-Logics.md +++ b/docs/Fixed-or-Improved-Logics.md @@ -2120,6 +2120,17 @@ Harvester.CanGuardArea=false ; boolean Harvester.CanGuardArea.RequireTarget=false ; boolean ``` +### Allow other vehicles to attempt to move above the target like ZEP + +- In vanilla, vehicles with `BalloonHover=yes` and a weapon with projectile with `Vertical=yes` will attempt to move above the target. +- Now you can make other vehicles do the same without `BalloonHover=yes` or `Vertical=yes`. + +In `rulesmd.ini`: +```ini +[SOMEWEAPON] ; WeaponType +GoAboveTarget=false ; boolean +``` + ### Bunker entering check dehardcode - In vanilla, vehicles entering tank bunkers are subject to a series of hardcoding restrictions, including having to have turrets, having to have weapons, and not having Hover speed types. Now you can skip these restrictions. diff --git a/docs/Whats-New.md b/docs/Whats-New.md index 26dac9cde1..87cf36d075 100644 --- a/docs/Whats-New.md +++ b/docs/Whats-New.md @@ -710,6 +710,7 @@ HideShakeEffects=false ; boolean - Fixed the bug where passengers, when their transport unit is removed, would cause incorrect `LimboTracker` counts due to either having their destructor called directly (bypassing `UnInit`) or nested `UnInit` calls resetting the deletion flag too early, thereby breaking auto-death and superweapon auxiliary techno checks (by NetsuNegi) - Fixed a bug where stationary vehicles would also block movement caused by external factors (by Noble_Fish) - Fixed AttachEffect with `RecreationDelay` of 0 checking `Delay` as well instead of immediately refreshing duration when possible (by Starkku) +- Allow other vehicles to attempt to move above the target like ZEP (by TaranDahl) #### Fixes / interactions with other extensions: - Taking over Ares' AlphaImage respawn logic to reduce lags from it (by NetsuNegi) diff --git a/docs/locale/zh_CN/LC_MESSAGES/CREDITS.po b/docs/locale/zh_CN/LC_MESSAGES/CREDITS.po index 1ec2ffd3ef..ce2306d7d3 100644 --- a/docs/locale/zh_CN/LC_MESSAGES/CREDITS.po +++ b/docs/locale/zh_CN/LC_MESSAGES/CREDITS.po @@ -2551,6 +2551,9 @@ msgid "" "Fixed voxel projectile and animation lighting issues" msgstr "修复了 Voxel 抛射体和动画的光照问题" +msgid "Allow other vehicles to attempt to move above the target like ZEP" +msgstr "使其他单位也能像 ZEP 一样尝试移动到目标上方" + msgid "**solar-III (凤九歌)**" msgstr "**solar-III(凤九歌)**" diff --git a/docs/locale/zh_CN/LC_MESSAGES/Fixed-or-Improved-Logics.po b/docs/locale/zh_CN/LC_MESSAGES/Fixed-or-Improved-Logics.po index 226555aef5..212117ad08 100644 --- a/docs/locale/zh_CN/LC_MESSAGES/Fixed-or-Improved-Logics.po +++ b/docs/locale/zh_CN/LC_MESSAGES/Fixed-or-Improved-Logics.po @@ -4707,6 +4707,21 @@ msgstr "" "若 `Harvester.CanGuardArea.RequireTarget` 设为 " "true,当单位警戒范围内不存在有效目标时将会切换回通常所用的 `Havrest` 任务。" +msgid "Allow other vehicles to attempt to move above the target like ZEP" +msgstr "使其他单位也能像 ZEP 一样尝试移动到目标上方" + +msgid "" +"In vanilla, vehicles with `BalloonHover=yes` and a weapon with projectile " +"with `Vertical=yes` will attempt to move above the target." +msgstr "" +"在原版中,拥有 `BalloonHover=yes` 且武器抛射体 `Vertical=yes` 的载具会尝试移动到目标上方。" + +msgid "" +"Now you can make other vehicles do the same without `BalloonHover=yes` or " +"`Vertical=yes`." +msgstr "" +"现在你可以让其他载具无需 `BalloonHover=yes` 或 `Vertical=yes` 也能做到这点。" + msgid "Bunker entering check dehardcode" msgstr "去除坦克碉堡准入检查的硬编码" diff --git a/docs/locale/zh_CN/LC_MESSAGES/Whats-New.po b/docs/locale/zh_CN/LC_MESSAGES/Whats-New.po index fc72521701..4cb5963958 100644 --- a/docs/locale/zh_CN/LC_MESSAGES/Whats-New.po +++ b/docs/locale/zh_CN/LC_MESSAGES/Whats-New.po @@ -2625,6 +2625,12 @@ msgid "" msgstr "" "修复了 *静止的载具* 也会阻碍外部力量引发移动的 Bug(by Noble_Fish)" +msgid "" +"Allow other vehicles to attempt to move above the target like ZEP (by " +"TaranDahl)" +msgstr "" +"使其他单位也能像 ZEP 一样尝试移动到目标上方(by TaranDahl)" + msgid "Fixes / interactions with other extensions:" msgstr "其他扩展引擎相关的修复/交互:" diff --git a/src/Ext/Unit/Hooks.Firing.cpp b/src/Ext/Unit/Hooks.Firing.cpp index 853ec461f1..7dfe915b96 100644 --- a/src/Ext/Unit/Hooks.Firing.cpp +++ b/src/Ext/Unit/Hooks.Firing.cpp @@ -160,3 +160,21 @@ DEFINE_HOOK(0x741A96, UnitClass_SetDestination_ResetFiringFrame, 0x6) return 0; } + +DEFINE_HOOK(0x74159F, UnitClass_ApproachTarget_GoAboveTarget, 0x6) +{ + GET(UnitClass* const, pThis, ESI); + + if (auto pTarget = pThis->Target) + { + int weaponIndex = pThis->SelectWeapon(pTarget); + if (auto pWeapon = pThis->GetWeapon(weaponIndex)->WeaponType) + { + auto pWeaponExt = WeaponTypeExt::ExtMap.Find(pWeapon); + if (pWeaponExt->GoAboveTarget) + return 0x7415E5; + } + } + + return 0; +} diff --git a/src/Ext/WeaponType/Body.cpp b/src/Ext/WeaponType/Body.cpp index f98678cfdc..df54bb03bb 100644 --- a/src/Ext/WeaponType/Body.cpp +++ b/src/Ext/WeaponType/Body.cpp @@ -171,6 +171,7 @@ void WeaponTypeExt::ExtData::LoadFromINIFile(CCINIClass* const pINI) this->AttackCursorOnFriendlies.Read(exINI, pSection, "AttackCursorOnFriendlies"); this->AttackNoThreatBuildings.Read(exINI, pSection, "AttackNoThreatBuildings"); this->CylinderRangefinding.Read(exINI, pSection, "CylinderRangefinding"); + this->GoAboveTarget.Read(exINI, pSection, "GoAboveTarget"); this->Anim_Update.Read(exINI, pSection, "Anim.Update"); // handle SkipWeaponPicking @@ -271,6 +272,7 @@ void WeaponTypeExt::ExtData::Serialize(T& Stm) .Process(this->AttackCursorOnFriendlies) .Process(this->AttackNoThreatBuildings) .Process(this->CylinderRangefinding) + .Process(this->GoAboveTarget) .Process(this->Anim_Update) ; }; diff --git a/src/Ext/WeaponType/Body.h b/src/Ext/WeaponType/Body.h index 5bb8734a4b..cf8f0fa681 100644 --- a/src/Ext/WeaponType/Body.h +++ b/src/Ext/WeaponType/Body.h @@ -99,6 +99,8 @@ class WeaponTypeExt Nullable AttackCursorOnFriendlies; Nullable AttackNoThreatBuildings; + Valueable GoAboveTarget; + Nullable Anim_Update; bool SkipWeaponPicking; @@ -188,6 +190,7 @@ class WeaponTypeExt , AttackFriendlies {} , AttackCursorOnFriendlies {} , AttackNoThreatBuildings {} + , GoAboveTarget { false } , CylinderRangefinding {} , Anim_Update {} { }