summaryrefslogtreecommitdiffstats
path: root/src/entities/Physical.cpp
diff options
context:
space:
mode:
authorFilip Gawin <filip.gawin@zoho.com>2021-01-31 21:06:38 +0100
committerFilip Gawin <filip.gawin@zoho.com>2021-01-31 21:06:38 +0100
commit3d4791f2915a5b1f38c34a0cf01e0dffc588af8c (patch)
treef6a510c62b8322a11292acafbbc266d1c2c466c2 /src/entities/Physical.cpp
parentFirst batch of fixes (CallAndMessage) (diff)
downloadre3-3d4791f2915a5b1f38c34a0cf01e0dffc588af8c.tar
re3-3d4791f2915a5b1f38c34a0cf01e0dffc588af8c.tar.gz
re3-3d4791f2915a5b1f38c34a0cf01e0dffc588af8c.tar.bz2
re3-3d4791f2915a5b1f38c34a0cf01e0dffc588af8c.tar.lz
re3-3d4791f2915a5b1f38c34a0cf01e0dffc588af8c.tar.xz
re3-3d4791f2915a5b1f38c34a0cf01e0dffc588af8c.tar.zst
re3-3d4791f2915a5b1f38c34a0cf01e0dffc588af8c.zip
Diffstat (limited to 'src/entities/Physical.cpp')
-rw-r--r--src/entities/Physical.cpp27
1 files changed, 11 insertions, 16 deletions
diff --git a/src/entities/Physical.cpp b/src/entities/Physical.cpp
index 4088f1d1..ed01297e 100644
--- a/src/entities/Physical.cpp
+++ b/src/entities/Physical.cpp
@@ -126,8 +126,6 @@ CPhysical::Add(void)
break;
default:
assert(0);
- debug("This shouldn't happen");
- return;
}
CPtrNode *node = list->InsertItem(this);
assert(node);
@@ -193,20 +191,17 @@ CPhysical::RemoveAndAdd(void)
list = &s->m_lists[ENTITYLIST_OBJECTS_OVERLAP];
break;
}
-#ifdef FIX_BUGS
- if(list)
-#endif
- if(next) {
- // If we still have old nodes, use them
- next->list->RemoveNode(next->listnode);
- list->InsertNode(next->listnode);
- next->list = list;
- next->sector = s;
- next = next->next;
- } else {
- CPtrNode *node = list->InsertItem(this);
- m_entryInfoList.InsertItem(list, node, s);
- }
+ if(next){
+ // If we still have old nodes, use them
+ next->list->RemoveNode(next->listnode);
+ list->InsertNode(next->listnode);
+ next->list = list;
+ next->sector = s;
+ next = next->next;
+ }else{
+ CPtrNode *node = list->InsertItem(this);
+ m_entryInfoList.InsertItem(list, node, s);
+ }
}
// Remove old nodes we no longer need