mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-06-07 02:33:28 +00:00
CBeamProjectile: Explicitly return std::nullopt in GetTouchBounds()
Allows some implementations to completely avoid zeroing out the internal buffer within the std::optional instance.
This commit is contained in:
parent
36ac0a8d78
commit
bf590dd855
@ -25,13 +25,16 @@ CBeamProjectile::CBeamProjectile(const TToken<CWeaponDescription>& wDesc, std::s
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::optional<zeus::CAABox> CBeamProjectile::GetTouchBounds() const {
|
std::optional<zeus::CAABox> CBeamProjectile::GetTouchBounds() const {
|
||||||
if (!GetActive())
|
if (!GetActive()) {
|
||||||
return {};
|
return std::nullopt;
|
||||||
|
}
|
||||||
|
|
||||||
if (x464_25_enableTouchDamage) {
|
if (x464_25_enableTouchDamage) {
|
||||||
zeus::CVector3f pos = GetTranslation();
|
const zeus::CVector3f pos = GetTranslation();
|
||||||
return {{pos - 0.1f, pos + 0.1f}};
|
return {{pos - 0.1f, pos + 0.1f}};
|
||||||
}
|
}
|
||||||
return {};
|
|
||||||
|
return std::nullopt;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CBeamProjectile::CalculateRenderBounds() { x9c_renderBounds = x354_.getTransformedAABox(x324_xf); }
|
void CBeamProjectile::CalculateRenderBounds() { x9c_renderBounds = x354_.getTransformedAABox(x324_xf); }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user