Skip to content

Commit

Permalink
Remove a useless variable and fix doc
Browse files Browse the repository at this point in the history
  • Loading branch information
CrimRecya committed Feb 24, 2025
1 parent 00752e4 commit 13cdc0c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 0 additions & 2 deletions docs/Fixed-or-Improved-Logics.md
Original file line number Diff line number Diff line change
Expand Up @@ -1350,8 +1350,6 @@ NoTurret.TrackTarget=false ; boolean

[SOMEUNIT] ; UnitType
NoTurret.TrackTarget= ; boolean, defaults to [General]->NoTurret.TrackTarget
```{warning}
Due to technical constraints, units that use `Convert.Deploy` from [Ares’ Type Conversion](https://ares-developers.github.io/Ares-docs/new/typeconversion.html) to change type with `Ammo.AddOnDeploy` will add or substract ammo despite of convertion success. This will also happen when unit exits tank bunker.
```

## Veinholes & Weeds
Expand Down
5 changes: 2 additions & 3 deletions src/Ext/Techno/Hooks.ReceiveDamage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ DEFINE_HOOK(0x701900, TechnoClass_ReceiveDamage_Shield, 0x6)
const auto pType = pTypeExt->OwnerObject();
const auto pWHExt = WarheadTypeExt::ExtMap.Find(args->WH);

int nDamageLeft = *args->Damage;
const auto pSourceHouse = args->SourceHouse;
const auto pTargetHouse = pThis->Owner;

Expand All @@ -50,7 +49,7 @@ DEFINE_HOOK(0x701900, TechnoClass_ReceiveDamage_Shield, 0x6)
}

// Raise Combat Alert
if (pRules->CombatAlert && nDamageLeft > 1)
if (pRules->CombatAlert && *args->Damage > 1)
{
auto raiseCombatAlert = [&]()
{
Expand Down Expand Up @@ -108,7 +107,7 @@ DEFINE_HOOK(0x701900, TechnoClass_ReceiveDamage_Shield, 0x6)
if (!pShieldData->IsActive())
return 0;

nDamageLeft = pShieldData->ReceiveDamage(args);
int nDamageLeft = pShieldData->ReceiveDamage(args);

if (nDamageLeft >= 0)
{
Expand Down

0 comments on commit 13cdc0c

Please sign in to comment.