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 @@ -648,6 +648,7 @@ This page lists all the individual contributions to the project by their author.
- Fix an issue where the vanilla script ignores jumpjets
- CellSpread in cylinder shape
- CellSpread damage check if victim is in air or on floor
- Allow other vehicles to attempt to move above the target like `BalloonHover=yes`
- **solar-III (凤九歌)**
- Target scanning delay customization (documentation)
- Skip target scanning function calling for unarmed technos (documentation)
Expand Down
12 changes: 12 additions & 0 deletions docs/Fixed-or-Improved-Logics.md
Original file line number Diff line number Diff line change
Expand Up @@ -1941,6 +1941,18 @@ In `rulesmd.ini`:
Harvester.CanGuardArea=no ; boolean
```

### Allow other vehicles to attempt to move above the target like `BalloonHover=yes`

- 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`.
- A weapon with projectile with `Vertical=yes` is still needed.

In `rulesmd.ini`:
```ini
[SOMEVEHICLE] ; VehicleType
CanGoAboveTarget=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.
Expand Down
1 change: 1 addition & 0 deletions docs/Whats-New.md
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,7 @@ New:
- [Customize type selection for IFV](Fixed-or-Improved-Logics.md#customize-type-selection-for-ifv) (by NetsuNegi)
- CellSpread in cylinder shape (by TaranDahl)
- CellSpread damage check if victim is in air or on floor (by TaranDahl)
- Allow other vehicles to attempt to move above the target like `BalloonHover=yes` (by TaranDahl)

Vanilla fixes:
- Fixed sidebar not updating queued unit numbers when adding or removing units when the production is on hold (by CrimRecya)
Expand Down
4 changes: 4 additions & 0 deletions src/Ext/TechnoType/Body.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1035,6 +1035,8 @@ void TechnoTypeExt::ExtData::LoadFromINIFile(CCINIClass* const pINI)
Debug::Log("[Developer warning][%s] Ammo.AutoConvertMinimumAmount is greater than Ammo.AutoConvertMaximumAmount, resulting in no conversion.\n", pSection);

this->InfantryAutoDeploy.Read(exINI, pSection, "InfantryAutoDeploy");

this->CanGoAboveTarget.Read(exINI, pSection, "CanGoAboveTarget");

// Ares 0.2
this->RadarJamRadius.Read(exINI, pSection, "RadarJamRadius");
Expand Down Expand Up @@ -1698,6 +1700,8 @@ void TechnoTypeExt::ExtData::Serialize(T& Stm)
.Process(this->InfantryAutoDeploy)

.Process(this->TurretResponse)

.Process(this->CanGoAboveTarget)
;
}
void TechnoTypeExt::ExtData::LoadFromStream(PhobosStreamReader& Stm)
Expand Down
4 changes: 4 additions & 0 deletions src/Ext/TechnoType/Body.h
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,8 @@ class TechnoTypeExt

Nullable<bool> TurretResponse;

Valueable<bool> CanGoAboveTarget;

ExtData(TechnoTypeClass* OwnerObject) : Extension<TechnoTypeClass>(OwnerObject)
, HealthBar_Hide { false }
, HealthBar_HidePips { false }
Expand Down Expand Up @@ -840,6 +842,8 @@ class TechnoTypeExt
, InfantryAutoDeploy {}

, TurretResponse {}

, CanGoAboveTarget { false }
{ }

virtual ~ExtData() = default;
Expand Down
9 changes: 9 additions & 0 deletions src/Ext/Unit/Hooks.Firing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,3 +160,12 @@ DEFINE_HOOK(0x741A96, UnitClass_SetDestination_ResetFiringFrame, 0x6)

return 0;
}

DEFINE_HOOK(0x74159F, UnitClass_ApproachTarget_GoAboveTarget, 0x6)
{
GET(UnitClass* const, pThis, ESI);
auto pType = pThis->Type;
auto pTypeExt = TechnoTypeExt::ExtMap.Find(pType);
R->AL(pType->BalloonHover || pTypeExt->CanGoAboveTarget);
return R->Origin() + 0x6;
}