Skip to content

Commit 04a33c6

Browse files
committed
Made the assert not awful, duh
1 parent 6f06423 commit 04a33c6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Entities/MovableObject.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -541,14 +541,15 @@ void MovableObject::DestroyScriptState() {
541541
m_ThreadedLuaState->RunScriptString(m_ScriptObjectName + " = nil;");
542542
m_ThreadedLuaState->UnregisterMO(this);
543543
m_ThreadedLuaState = nullptr;
544+
m_ScriptObjectName.clear();
544545
}
545546
}
546547
}
547548

548549
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
549550

550551
void MovableObject::Destroy(bool notInherited) {
551-
RTEAssert(m_ThreadedLuaState == nullptr, "Destroying an MO that still has a script state!");
552+
RTEAssert(m_ScriptObjectName.empty(), "Destroying an MO that still has a script state!");
552553

553554
g_MovableMan.UnregisterObject(this);
554555
if (!notInherited) {

0 commit comments

Comments
 (0)