Fix runtime-generated cinematics not working

This commit is contained in:
Kae 2023-06-21 16:07:49 +10:00
parent 391527d812
commit d08b3c3b22

View File

@ -2270,9 +2270,8 @@ void Player::queueRadioMessage(RadioMessage message) {
} }
Maybe<Json> Player::pullPendingCinematic() { Maybe<Json> Player::pullPendingCinematic() {
if (m_pendingCinematic) if (m_pendingCinematic && m_pendingCinematic->isType(Json::Type::String))
if (auto cinematic = *m_pendingCinematic) m_log->addCinematic(m_pendingCinematic->toString());
m_log->addCinematic(cinematic.toString());
return take(m_pendingCinematic); return take(m_pendingCinematic);
} }