diff options
author | mrb0nk500 <b0nk@b0nk.xyz> | 2023-07-18 16:05:14 -0300 |
---|---|---|
committer | mrb0nk500 <b0nk@b0nk.xyz> | 2023-07-18 16:05:14 -0300 |
commit | c904f9d4f1055330f437845ee5a323a9646e8686 (patch) | |
tree | ad0993d47c34f7935616e08fa4990d66633224cf | |
parent | 569acdac5cb8e8ab352e2fbbae9660d9ad29c41a (diff) |
I thought of doing this because of this message from Ninji.
https://discord.com/channels/727908905392275526/727908905828483073/1130913392635432972
-rw-r--r-- | src/pso/TObject.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/pso/TObject.cpp b/src/pso/TObject.cpp index c832ebe..b0c288d 100644 --- a/src/pso/TObject.cpp +++ b/src/pso/TObject.cpp @@ -117,14 +117,13 @@ void TObject::render_nodes() { } } -// Perfect match, needed to do some weird stuff to get it to match, see below. void TObject::run_tasks() { TObject *child = this->m_down; while (this->m_down != NULL && child != NULL) { TObject *node = child; child = child->m_next; if (node->m_flags & DISALLOW_UPDATE) { - // Clearing flag 0 in the if statement is required to match. + // NOTE: Clearing flag 0 in the if statement is required to match. if (node->m_flags & QUEUE_DESTRUCTION && (node->m_flags &= ~QUEUE_DESTRUCTION, !(node->m_flags & DISALLOW_DESTRUCTION))) { delete node; } else { @@ -134,11 +133,13 @@ void TObject::run_tasks() { node->m_flags &= ~CHILD_QUEUE_DESTRUCTION; } - if (!(node->m_flags & BIT_2)) { - // Adding this here somehow causes the - // dead code to be compiled. - // `volatile` typecast is required to match. - (vu16)node->m_flags & QUEUE_DESTRUCTION; + // NOTE: Both if statements below are required to match. + if (node->m_flags & BIT_2) { + continue; + } + + if (node->m_flags & BIT_3) { + continue; } } } else { |