Skip to content

Commit 323648f

Browse files
authored
[Minor] Fix PR#1629 (#1741)
1 parent 2c9e328 commit 323648f

File tree

4 files changed

+33
-35
lines changed

4 files changed

+33
-35
lines changed

CREDITS.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,6 @@ This page lists all the individual contributions to the project by their author.
397397
- Enhanced reveal & gap warhead
398398
- Fix an issue that teleport units board transport vehicles on the bridge will create an impassable invisible barrier, which may cause the game to freeze or even crash
399399
- Fix wrong shadow when a vehicle has hover locomotor and is being lifted by `IsLocomotor=yes` warhead
400-
- Fix the bug that a unit can overlap with `Teleport` units after it's been damaged by a fallen unit lifted by `IsLocomotor=yes` warheads
401400
- Customize parasite culling targets
402401
- Customize harvester dump amount
403402
- Select box logic

docs/Fixed-or-Improved-Logics.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,6 @@ This page describes all ingame logics that are fixed or improved in Phobos witho
214214
- Fixed an issue that teleport units board transport vehicles on the bridge will create an impassable invisible barrier, which may cause the game to freeze or even crash.
215215
- Fixed an issue that moving MCV with Teleport locomotion will cause reconnection error.
216216
- Fixed wrong shadow when a vehicle has hover locomotor and is being lifted by `IsLocomotor=yes` warhead.
217-
- Fixed the bug that a unit can overlap with `Teleport` units after it's been damaged by a fallen unit lifted by `IsLocomotor=yes` warheads.
218217
- Fixed an issue that game crashes (EIP:7FB178) when infantry are about to enter an occupiable building that has been removed and is not real dead.
219218
- Fixed an issue that game crashes when spawnee has been removed and is not real dead.
220219
- Separated the AirstrikeClass pointer between the attacker/aircraft and the target to avoid erroneous overwriting issues.

docs/Whats-New.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -727,7 +727,6 @@ Vanilla fixes:
727727
- Fixed an issue that aircraft carriers cannot retract its spawned aircraft when on the bridge (by CrimRecya)
728728
- Fixed an issue where the shadow of jumpjet remained on the ground when it was above the elevated bridge (by CrimRecya)
729729
- Fixed an issue where AI would select unreachable buildings and get stuck when looking for buildings like tank bunkers, bio reactors, etc. (by TaranDahl)
730-
- Fixed the bug that a unit can overlap with `Teleport` units after it's been damaged by a fallen unit lifted by `IsLocomotor=yes` warheads (by NetsuNegi)
731730
- Fixed an issue that harvesters with amphibious movement zone can not automatically return to refineries with `WaterBound` on water surface (by NetsuNegi)
732731
- Fixed an issue that game crashes (EIP:7FB178) when infantry are about to enter an occupiable building that has been removed and is not real dead (by CrimRecya)
733732
- Fixed an issue that game crashes when spawnee has been removed and is not real dead (by CrimRecya)

src/Misc/Hooks.BugFixes.cpp

Lines changed: 33 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -2014,38 +2014,39 @@ DEFINE_HOOK(0x73C43F, UnitClass_DrawAsVXL_Shadow_IsLocomotorFix2, 0x6)
20142014
return SkipGameCode;
20152015
}
20162016

2017-
namespace RemoveCellContentTemp
2018-
{
2019-
bool CheckBeforeUnmark = false;
2020-
}
2021-
2022-
DEFINE_HOOK(0x737F74, UnitClass_ReceiveDamage_NowDead_MarkUp, 0x6)
2023-
{
2024-
enum { SkipGameCode = 0x737F80 };
2025-
2026-
GET(UnitClass*, pThis, ESI);
2027-
2028-
RemoveCellContentTemp::CheckBeforeUnmark = true;
2029-
pThis->Mark(MarkType::Up);
2030-
RemoveCellContentTemp::CheckBeforeUnmark = false;
2031-
2032-
return SkipGameCode;
2033-
}
2034-
2035-
DEFINE_HOOK(0x47EAF7, CellClass_RemoveContent_BeforeUnmarkOccupationBits, 0x7)
2036-
{
2037-
enum { ContinueCheck = 0x47EAFE, DontUnmark = 0x47EB8F };
2038-
2039-
GET(CellClass*, pCell, EDI);
2040-
GET_STACK(bool, onBridge, STACK_OFFSET(0x14, 0x8));
2041-
2042-
if (RemoveCellContentTemp::CheckBeforeUnmark && (onBridge ? pCell->AltObject : pCell->FirstObject))
2043-
return DontUnmark;
2044-
2045-
GET(ObjectClass*, pContent, ESI);
2046-
R->EAX(pContent->WhatAmI());
2047-
return ContinueCheck;
2048-
}
2017+
// These hooks cause invisible barrier in multiplayer games, when a tank destroyed in tank bunker, and then the bunker has been sold
2018+
//namespace RemoveCellContentTemp
2019+
//{
2020+
// bool CheckBeforeUnmark = false;
2021+
//}
2022+
//
2023+
//DEFINE_HOOK(0x737F74, UnitClass_ReceiveDamage_NowDead_MarkUp, 0x6)
2024+
//{
2025+
// enum { SkipGameCode = 0x737F80 };
2026+
//
2027+
// GET(UnitClass*, pThis, ESI);
2028+
//
2029+
// RemoveCellContentTemp::CheckBeforeUnmark = true;
2030+
// pThis->Mark(MarkType::Up);
2031+
// RemoveCellContentTemp::CheckBeforeUnmark = false;
2032+
//
2033+
// return SkipGameCode;
2034+
//}
2035+
//
2036+
//DEFINE_HOOK(0x47EAF7, CellClass_RemoveContent_BeforeUnmarkOccupationBits, 0x7)
2037+
//{
2038+
// enum { ContinueCheck = 0x47EAFE, DontUnmark = 0x47EB8F };
2039+
//
2040+
// GET(CellClass*, pCell, EDI);
2041+
// GET_STACK(bool, onBridge, STACK_OFFSET(0x14, 0x8));
2042+
//
2043+
// if (RemoveCellContentTemp::CheckBeforeUnmark && (onBridge ? pCell->AltObject : pCell->FirstObject))
2044+
// return DontUnmark;
2045+
//
2046+
// GET(ObjectClass*, pContent, ESI);
2047+
// R->EAX(pContent->WhatAmI());
2048+
// return ContinueCheck;
2049+
//}
20492050

20502051
DEFINE_HOOK(0x481778, CellClass_ScatterContent_Scatter, 0x6)
20512052
{

0 commit comments

Comments
 (0)