2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 07:07:42 +00:00

CDamageInfo and CDamageVulnerability imps

This commit is contained in:
2017-02-09 21:43:07 -08:00
parent 48c295f9d8
commit 43bfb638c9
8 changed files with 265 additions and 73 deletions

View File

@@ -7,6 +7,26 @@ CScannableObjectInfo::CScannableObjectInfo(CInputStream& in, ResId resId) : x0_s
{
u32 version = in.readUint32Big();
Load(in, version);
float appearanceOffset = g_tweakGui->GetScanAppearanceOffset();
for (u32 i = 0 ; i < x14_buckets.size(); ++i)
{
if (x14_buckets[i].x8_imagePos != -1)
{
x14_buckets[i].x4_appearanceRange += appearanceOffset;
for (u32 j = i; j < x14_buckets.size(); j++)
x14_buckets[j].x4_appearanceRange += appearanceOffset;
}
}
for (u32 i = 0; i < x14_buckets.size() - 1; ++i)
{
for (u32 j = i + 1; j < x14_buckets.size(); ++j)
{
if (x14_buckets[i].x8_imagePos == x14_buckets[j].x8_imagePos && x14_buckets[i].x8_imagePos != -1)
x14_buckets[j].x8_imagePos = -1;
}
}
}
ResId CScannableObjectInfo::GetScannableObjectId() const { return x0_scannableObjectId; }