Merge pull request #262 from lioncash/nullopt

CBeamProjectile: Explicitly return std::nullopt in GetTouchBounds()
This commit is contained in:
Phillip Stephens 2020-03-23 23:27:54 -07:00 committed by GitHub
commit dbbf9e33fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 4 deletions

View File

@ -25,13 +25,16 @@ CBeamProjectile::CBeamProjectile(const TToken<CWeaponDescription>& wDesc, std::s
}
std::optional<zeus::CAABox> CBeamProjectile::GetTouchBounds() const {
if (!GetActive())
return {};
if (!GetActive()) {
return std::nullopt;
}
if (x464_25_enableTouchDamage) {
zeus::CVector3f pos = GetTranslation();
const zeus::CVector3f pos = GetTranslation();
return {{pos - 0.1f, pos + 0.1f}};
}
return {};
return std::nullopt;
}
void CBeamProjectile::CalculateRenderBounds() { x9c_renderBounds = x354_.getTransformedAABox(x324_xf); }