CAmbientAI: Return std::nullopt in GetTouchBounds()

Allows implementations to avoid zeroing out the internal buffer of the
std::optional.
This commit is contained in:
Lioncash 2020-04-22 02:10:50 -04:00
parent 472e97aac0
commit 52f51c111a
1 changed files with 3 additions and 2 deletions

View File

@ -125,9 +125,10 @@ void CAmbientAI::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CState
} }
std::optional<zeus::CAABox> CAmbientAI::GetTouchBounds() const { std::optional<zeus::CAABox> CAmbientAI::GetTouchBounds() const {
if (GetActive()) if (GetActive()) {
return {GetBoundingBox()}; return {GetBoundingBox()};
return {}; }
return std::nullopt;
} }
void CAmbientAI::RandomizePlaybackRate(CStateManager& mgr) { void CAmbientAI::RandomizePlaybackRate(CStateManager& mgr) {