Skip to content
Closed
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 @@ -515,6 +515,7 @@ This page lists all the individual contributions to the project by their author.
- Add toggle of whether shield use ArmorMultiplier or not
- Fix an Ares bug that led to erroneous interactions where the parasite would frequently reset to the victim's position under specific circumstances and that was highly prone to crashes
- Fix the bug that if paradropping technos with `Crashable=yes` has been destroyed in air, they will falling down on ground but not dead
- 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 @@ -311,6 +311,7 @@ This page describes all ingame logics that are fixed or improved in Phobos witho
- Fixed the bug that unit will play crashing voice & sound when dropped by warhead with `IsLocomotor=yes`.
- Fixed an issue that retaliation will make the unit keep switching among multiple targets with the same amount of threat.
- Fixed the bug that if paradropping technos with `Crashable=yes` has been destroyed in air, they will falling down on ground but not dead.
- 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 @@ -621,6 +621,7 @@ Vanilla fixes:
- Voxel drawing code now skips sections that are invisible (have all zeros in the transform matrix main diagonal, meaning that the scale is 0% on all axes), thus increasing drawing performance for some voxels (by Kerbiter & ZivDero)
- Fixed the bug that unit will play crashing voice & sound when dropped by warhead with `IsLocomotor=yes` (by NetsuNegi)
- Fixed the bug that if paradropping technos with `Crashable=yes` has been destroyed in air, they will falling down on ground but not dead (by NetsuNegi)
- 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 @@ -1682,6 +1682,11 @@ msgid ""
msgstr ""
"修复了当 `Crashable=yes` 的科技类型在空降时被于半空中摧毁,它会落地但不会死亡的 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 @@ -1594,6 +1594,11 @@ msgid ""
"been destroyed in air, they will falling down on ground but not dead."
msgstr "修复了当 `Crashable=yes` 的科技类型在空降时被于半空中摧毁,它会落地但不会死亡的 Bug。"

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 @@ -2112,6 +2112,11 @@ msgid ""
"been destroyed in air, they will falling down on ground but not dead (by NetsuNegi)"
msgstr "修复了当 `Crashable=yes` 的科技类型在空降时被于半空中摧毁,它会落地但不会死亡的 Bug(by NetsuNegi)"

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
35 changes: 35 additions & 0 deletions src/Misc/Hooks.BugFixes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
#include <Ext/WarheadType/Body.h>
#include <Ext/Cell/Body.h>

#include <unordered_set>

/*
Allow usage of TileSet of 255 and above without making NE-SW broken bridges unrepairable

Expand Down Expand Up @@ -2327,6 +2329,39 @@ DEFINE_HOOK(0x489E47, DamageArea_RockerItemsFix2, 0x6)

#pragma endregion

#pragma region Low Air Damage Fix

namespace DamageArea_LowAirDamageTemp
{
std::unordered_set<ObjectClass*> Scanned;
}

DEFINE_HOOK(0x4894B6, MapClass_DamageArea_AirTechno_Record, 0x5)
{
GET(TechnoClass*, pAirTechno, EBX);

DamageArea_LowAirDamageTemp::Scanned.emplace(pAirTechno);

return 0;
}

DEFINE_HOOK(0x489767, MapClass_DamageArea_CheckScanned, 0x6)
{
enum { GoNextObject = 0x4899B3 };

GET(ObjectClass*, pObject, ESI);

return DamageArea_LowAirDamageTemp::Scanned.contains(pObject) ? GoNextObject : 0;
}

DEFINE_HOOK(0x4899DA, MapClass_DamageArea_ClearScanned, 0x7)
{
DamageArea_LowAirDamageTemp::Scanned.clear();
return 0;
}

#pragma endregion

DEFINE_HOOK(0x71A7BC, TemporalClass_Update_DistCheck, 0x6)
{
enum { SkipGameCode = 0x71A82C };
Expand Down
Loading