Skip to content

Commit d5ec7d6

Browse files
Merge remote-tracking branch 'Phobos-developers/develop' into dev-docs
2 parents 1b5f3db + b741d71 commit d5ec7d6

File tree

4 files changed

+13
-20
lines changed

4 files changed

+13
-20
lines changed

CREDITS.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,6 @@ This page lists all the individual contributions to the project by their author.
414414
- Fix an issue where miners affected by `Passengers/DeployFire` were unable to unload minerals
415415
- Fix an issue where mining vehicles could not move after leaving a tank bunker
416416
- Fixed the bug in AI scripts 56 and 57 that forced the launch of superweapons with index numbers 3 and 4
417-
- Fix rare cases where paradropped techno killed by falling down
418417
- **NetsuNegi**:
419418
- Forbidding parallel AI queues by type
420419
- Jumpjet crash speed fix when crashing onto building
@@ -636,7 +635,6 @@ This page lists all the individual contributions to the project by their author.
636635
- AutoDeath upon ownership change
637636
- Maximum amount for power plant enhancer
638637
- Return warhead
639-
- Fix rare cases where paradropped techno killed by falling down
640638
- **NaotoYuuki** - Vertical & meteor trajectory projectile prototypes
641639
- **handama** - AI script action to `16005 Jump Back To Previous Script`
642640
- **TaranDahl (航味麻酱)**:

docs/Fixed-or-Improved-Logics.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,6 @@ This page describes all ingame logics that are fixed or improved in Phobos witho
305305
- Fixed the issue that the move mission of the jumpjet does not end correctly.
306306
- AI team garrison scripts now re-evaluate destination immediately instead of trying to garrison ungarrisonable building before changing target.
307307
- Fixed the bug that `DeploysInto` and `UndeploysInto` will make damaged techno lose 1 health.
308-
- Fixed rare cases where paradropped techno killed by falling down.
309308
- Fixed the issue that the Jumpjet must end its movement before starting the next mission.
310309

311310
## Fixes / interactions with other extensions

docs/Whats-New.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,6 @@ Vanilla fixes:
606606
- Fixed the issue that the move mission of the jumpjet does not end correctly (by TaranDahl)
607607
- AI team garrison scripts now re-evaluate destination immediately instead of trying to garrison ungarrisonable building before changing target (by Starkku)
608608
- Fixed the bug that `DeploysInto` and `UndeploysInto` will make damaged techno lose 1 health (by CrimRecya)
609-
- Fixed rare cases where paradropped techno killed by falling down (by FlyStar & Ollerus)
610609
- Fixed the issue that the Jumpjet must end its movement before starting the next mission (by TaranDahl)
611610
612611
Phobos fixes:

src/Ext/Techno/Hooks.cpp

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -876,25 +876,22 @@ DEFINE_HOOK(0x5F4032, ObjectClass_FallingDown_ToDead, 0x6)
876876
if (!pCell->IsClearToMove(pType->SpeedType, true, true, -1, pType->MovementZone, pCell->GetLevel(), pCell->ContainsBridge()))
877877
return 0;
878878

879-
int damage = 0;
879+
const auto pTypeExt = TechnoTypeExt::ExtMap.Find(pType);
880+
double ratio = 0.0;
880881

881-
if (!pTechno->HasParachute)
882-
{
883-
const auto pTypeExt = TechnoTypeExt::ExtMap.Find(pType);
884-
double ratio = 0.0;
882+
if (pCell->LandType == LandType::Water && !pTechno->OnBridge)
883+
ratio = pTypeExt->FallingDownDamage_Water.Get(pTypeExt->FallingDownDamage.Get());
884+
else
885+
ratio = pTypeExt->FallingDownDamage.Get();
885886

886-
if (pCell->LandType == LandType::Water && !pTechno->OnBridge)
887-
ratio = pTypeExt->FallingDownDamage_Water.Get(pTypeExt->FallingDownDamage.Get());
888-
else
889-
ratio = pTypeExt->FallingDownDamage.Get();
887+
int damage = 0;
890888

891-
if (ratio < 0.0)
892-
damage = static_cast<int>(pThis->Health * std::abs(ratio));
893-
else if (ratio >= 0.0 && ratio <= 1.0)
894-
damage = static_cast<int>(pType->Strength * ratio);
895-
else
896-
damage = static_cast<int>(ratio);
897-
}
889+
if (ratio < 0.0)
890+
damage = static_cast<int>(pThis->Health * std::abs(ratio));
891+
else if (ratio >= 0.0 && ratio <= 1.0)
892+
damage = static_cast<int>(pType->Strength * ratio);
893+
else
894+
damage = static_cast<int>(ratio);
898895

899896
pThis->ReceiveDamage(&damage, 0, RulesClass::Instance->C4Warhead, nullptr, true, true, nullptr);
900897

0 commit comments

Comments
 (0)