mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-09 13:47:43 +00:00
Remove rstl::optional_object, various cleanups, implement CExplosion and CScriptDoor
This commit is contained in:
@@ -5,37 +5,46 @@ namespace urde
|
||||
{
|
||||
|
||||
CBeamProjectile::CBeamProjectile(const TToken<CWeaponDescription>& wDesc, std::string_view name, EWeaponType wType,
|
||||
const zeus::CTransform& xf, int flags, float f1, float f2, EMaterialTypes matType,
|
||||
const zeus::CTransform& xf, s32 flags, float f1, float f2, EMaterialTypes matType,
|
||||
const CDamageInfo& dInfo, TUniqueId uid, TAreaId aid, TUniqueId owner,
|
||||
EProjectileAttrib attribs, bool b1)
|
||||
: CGameProjectile(false, wDesc, name, wType, xf, matType, dInfo, uid, aid, owner, kInvalidUniqueId, attribs, false,
|
||||
zeus::CVector3f::skOne, {}, -1, false)
|
||||
, x2e8_(std::abs(flags))
|
||||
, x2ec_(x2e8_)
|
||||
, x2f0_(1.f / x2ec_)
|
||||
, x2f4_(f1)
|
||||
, x300_(b1 == false ? x2ec_ : 0.f)
|
||||
, x464_24_(b1)
|
||||
, x464_25_(false)
|
||||
{
|
||||
}
|
||||
|
||||
void CBeamProjectile::Think(float, CStateManager &)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
rstl::optional_object<zeus::CAABox> CBeamProjectile::GetTouchBounds() const
|
||||
std::experimental::optional<zeus::CAABox> CBeamProjectile::GetTouchBounds() const
|
||||
{
|
||||
if (!GetActive())
|
||||
return {};
|
||||
if (!x464_25_)
|
||||
{
|
||||
zeus::CVector3f pos = GetTranslation();
|
||||
return {{pos - 1.f, pos + 1.f}};
|
||||
}
|
||||
return {};
|
||||
}
|
||||
|
||||
void CBeamProjectile::Touch(CActor &, CStateManager &)
|
||||
void CBeamProjectile::CalculateRenderBounds()
|
||||
{
|
||||
|
||||
x9c_renderBounds = x354_.getTransformedAABox(x324_);
|
||||
}
|
||||
|
||||
void CBeamProjectile::ResetBeam(CStateManager &, bool)
|
||||
{
|
||||
|
||||
if (x464_24_)
|
||||
x300_ = 0.f;
|
||||
}
|
||||
|
||||
void CBeamProjectile::UpdateFX(const zeus::CTransform &, float, CStateManager &)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void CBeamProjectile::Accept(urde::IVisitor& visitor)
|
||||
|
||||
Reference in New Issue
Block a user