mirror of https://github.com/AxioDL/metaforce.git
CScriptVisorGoo: Use std::make_optional where applicable
Same behavior, but without a verbose type name.
This commit is contained in:
parent
61f9adfa70
commit
b3b71a2e76
|
@ -73,12 +73,10 @@ void CScriptVisorGoo::Think(float, CStateManager& mgr) {
|
||||||
float t = (x108_maxDist - eyeToGooDist) / (x108_maxDist - x104_minDist);
|
float t = (x108_maxDist - eyeToGooDist) / (x108_maxDist - x104_minDist);
|
||||||
if (mgr.GetActiveRandom()->Float() * 100.f <= (1.f - t) * x110_farProb + t * x10c_nearProb) {
|
if (mgr.GetActiveRandom()->Float() * 100.f <= (1.f - t) * x110_farProb + t * x10c_nearProb) {
|
||||||
mgr.AddObject(new CHUDBillboardEffect(
|
mgr.AddObject(new CHUDBillboardEffect(
|
||||||
xfc_particleId.IsValid() ? xe8_particleDesc : std::optional<TToken<CGenDescription>>(),
|
xfc_particleId.IsValid() ? std::make_optional(xe8_particleDesc) : std::nullopt,
|
||||||
x100_electricId.IsValid() ? xf0_electricDesc
|
x100_electricId.IsValid() ? std::make_optional(xf0_electricDesc) : std::nullopt,
|
||||||
: std::optional<TToken<CElectricDescription>>(),
|
|
||||||
mgr.AllocateUniqueId(), true, "VisorGoo", CHUDBillboardEffect::GetNearClipDistance(mgr),
|
mgr.AllocateUniqueId(), true, "VisorGoo", CHUDBillboardEffect::GetNearClipDistance(mgr),
|
||||||
CHUDBillboardEffect::GetScaleForPOV(mgr), x114_color, zeus::skOne3f,
|
CHUDBillboardEffect::GetScaleForPOV(mgr), x114_color, zeus::skOne3f, zeus::skZero3f));
|
||||||
zeus::skZero3f));
|
|
||||||
CSfxManager::SfxStart(xf8_sfx, 1.f, 0.f, false, 0x7f, false, kInvalidAreaId);
|
CSfxManager::SfxStart(xf8_sfx, 1.f, 0.f, false, 0x7f, false, kInvalidAreaId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue