@@ -20,8 +20,7 @@ DEFINE_HOOK(0x701900, TechnoClass_ReceiveDamage_Shield, 0x6)
20
20
const auto pExt = TechnoExt::ExtMap.Find (pThis);
21
21
22
22
int nDamageLeft = *args->Damage ;
23
- double versus = MapClass::GetTotalDamage (nDamageLeft, args->WH , pThis->GetTechnoType ()->Armor , 0 );
24
- int nDamageTotal = static_cast <int >(nDamageLeft * versus);
23
+ int nDamageTotal = MapClass::GetTotalDamage (nDamageLeft, args->WH , pThis->GetTechnoType ()->Armor , 0 );
25
24
auto const pWHExt = WarheadTypeExt::ExtMap.Find (args->WH );
26
25
27
26
if (!args->IgnoreDefenses )
@@ -36,8 +35,7 @@ DEFINE_HOOK(0x701900, TechnoClass_ReceiveDamage_Shield, 0x6)
36
35
*args->Damage = 0 ;
37
36
pThis->Health = 1 ;
38
37
pThis->EstimatedHealth = 1 ;
39
-
40
- return SkipGameCode;
38
+ ReceiveDamageTemp::SkipLowDamageCheck = true ;
41
39
}
42
40
43
41
return 0 ;
@@ -59,15 +57,14 @@ DEFINE_HOOK(0x701900, TechnoClass_ReceiveDamage_Shield, 0x6)
59
57
}
60
58
61
59
// Update remaining damage and check if the target will die and should be avoided
62
- nDamageTotal = static_cast < int > (nDamageLeft * versus );
60
+ nDamageTotal = MapClass::GetTotalDamage (nDamageLeft, args-> WH , pThis-> GetTechnoType ()-> Armor , 0 );
63
61
64
62
if (pThis->Health > 0 && !pWHExt->CanKill && nDamageTotal >= pThis->Health )
65
63
{
66
64
*args->Damage = 0 ;
67
65
pThis->Health = 1 ;
68
66
pThis->EstimatedHealth = 1 ;
69
-
70
- return SkipGameCode;
67
+ ReceiveDamageTemp::SkipLowDamageCheck = true ;
71
68
}
72
69
73
70
return 0 ;
0 commit comments