mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 21:57:57 +03:00
Reordered NotifyDelete switch statement for more clarity
This commit is contained in:
parent
f01a0a17c1
commit
0f7691c722
1 changed files with 10 additions and 4 deletions
|
@ -1807,10 +1807,6 @@ void ScriptVM::NotifyDelete(void)
|
|||
}
|
||||
|
||||
switch (state) {
|
||||
case STATE_DESTROYED:
|
||||
ScriptError("Attempting to delete a dead thread.");
|
||||
break;
|
||||
|
||||
case STATE_RUNNING:
|
||||
case STATE_SUSPENDED:
|
||||
case STATE_WAITING:
|
||||
|
@ -1832,6 +1828,16 @@ void ScriptVM::NotifyDelete(void)
|
|||
delete this;
|
||||
|
||||
break;
|
||||
|
||||
case STATE_DESTROYED:
|
||||
ScriptError("Attempting to delete a dead thread.");
|
||||
|
||||
state = STATE_DESTROYED;
|
||||
|
||||
if (m_ScriptClass) {
|
||||
m_ScriptClass->RemoveThread(this);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue