Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CREDITS.md
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,7 @@ This page lists all the individual contributions to the project by their author.
- Fix a bug where passengers created by the InitialPayload logic or TeamType with `Full=true` would fail to fire when the transport unit with `OpenTopped=yes` moved to an area that the passengers' `MovementZone` cannot move into
- Fix a bug where game will crash after loading if a techno with `AlphaImage` converts to a type without it, or an anim with `AlphaImage` changes to a type without it through `Next`
- Fix a bug where updating the `OpenTopped` attribute during convert did not update the coordinates of passengers
- Fix the bug that low-air taking off / landing objects will receive twice damage
- **Apollo** - Translucent SHP drawing patches
- **ststl**:
- Customizable `ShowTimer` priority of superweapons
Expand Down
1 change: 1 addition & 0 deletions docs/Fixed-or-Improved-Logics.md
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,7 @@ This page describes all ingame logics that are fixed or improved in Phobos witho
- `ElectricAssault` weapons can now auto acquire allies' overpowerable defenses.
- Fixed the 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.
- Purely visual animations and particles are no longer included in frame CRC generation and are thus exempt from any sync checks between players in multiplayer games.
- Fixed the bug that low-air taking off / landing objects will receive twice damage.

## Fixes / interactions with other extensions

Expand Down
1 change: 1 addition & 0 deletions docs/Whats-New.md
Original file line number Diff line number Diff line change
Expand Up @@ -658,6 +658,7 @@ Vanilla fixes:
- Purely visual animations and particles excluded from sync checks (by Starkku)
- Fixed AI team recruitment inconsistency causing underfilled teams (by handama)
- Fixed the issue where tint color RGB mode conversion was incorrect (by Shatyuka)
- Fixed the bug that low-air taking off / landing objects will receive twice damage (by NetsuNegi)

Phobos fixes:
- Fixed the bug that `AllowAirstrike=no` cannot completely prevent air strikes from being launched against it (by NetsuNegi)
Expand Down
5 changes: 5 additions & 0 deletions docs/locale/zh_CN/LC_MESSAGES/CREDITS.po
Original file line number Diff line number Diff line change
Expand Up @@ -1758,6 +1758,11 @@ msgid ""
"not update the coordinates of passengers"
msgstr "修复了类型转换会更新 `OpenTopped` 属性却不更新乘客坐标的 Bug"

msgid ""
"Fix the bug that low-air taking off / landing objects will receive "
"twice damage"
msgstr "修复了低空起飞/降落的物体会受到两次伤害的 Bug"

msgid "**Apollo** - Translucent SHP drawing patches"
msgstr "**Apollo** - 半透明 SHP 绘制补丁"

Expand Down
5 changes: 5 additions & 0 deletions docs/locale/zh_CN/LC_MESSAGES/Fixed-or-Improved-Logics.po
Original file line number Diff line number Diff line change
Expand Up @@ -1678,6 +1678,11 @@ msgid ""
"in multiplayer games."
msgstr "纯视觉效果的动画和粒子不再包含在帧 CRC 生成中并因此不会受多人游戏中玩家间同步检查的限制。"

msgid ""
"Fixed the bug that low-air taking off / landing objects will receive "
"twice damage."
msgstr "修复了低空起飞/降落的物体会受到两次伤害的 Bug。"

msgid "Fixes / interactions with other extensions"
msgstr "修复或与其他扩展的交互"

Expand Down
5 changes: 5 additions & 0 deletions docs/locale/zh_CN/LC_MESSAGES/Whats-New.po
Original file line number Diff line number Diff line change
Expand Up @@ -2332,6 +2332,11 @@ msgid ""
"Shatyuka)"
msgstr "修复了染色颜色的 RGB 模式转换不正确的问题(by Shatyuka)"

msgid ""
"Fixed the bug that low-air taking off / landing objects will receive "
"twice damage (by NetsuNegi)"
msgstr "修复了低空起飞/降落的物体会受到两次伤害的 Bug(by NetsuNegi)"

msgid "Phobos fixes:"
msgstr "Phobos 过往版本问题修复:"

Expand Down
30 changes: 30 additions & 0 deletions src/Misc/Hooks.BugFixes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2214,6 +2214,19 @@ namespace DamageAreaTemp
{
const CellClass* CheckingCell = nullptr;
bool CheckingCellAlt = false;
bool AircraftTrackerChecked = false;
}

DEFINE_HOOK(0x489286, MapClass_DamageArea_BeforeAll, 0x6)
{
DamageAreaTemp::AircraftTrackerChecked = false;
return 0;
}

DEFINE_HOOK(0x4893C3, MapClass_DamageArea_DamageAir, 0x6)
{
DamageAreaTemp::AircraftTrackerChecked = true;
return 0;
}

// Skip useless alt check, so it will only start checking from the cell's FirstObject
Expand Down Expand Up @@ -2325,6 +2338,23 @@ DEFINE_HOOK(0x489E47, DamageArea_RockerItemsFix2, 0x6)
return 0;
}

// https://github.com/Phobos-developers/Phobos/pull/2146
DEFINE_HOOK(0x489710, MapClass_DamageArea_LowAirFix, 0x7)
{
enum { GoNextObject = 0x4899B3 };

if (DamageAreaTemp::AircraftTrackerChecked) // have we checked AircraftTracker ?
{
GET(ObjectClass*, pObject, ESI);
const auto pTechno = abstract_cast<TechnoClass*, true>(pObject);

if (pTechno && pTechno->GetLastFlightMapCoords() != CellStruct::Empty) // this means it is in AircraftTracker
return GoNextObject;
}

return 0;
}

#pragma endregion

DEFINE_HOOK(0x71A7BC, TemporalClass_Update_DistCheck, 0x6)
Expand Down
Loading