Revert "First batch of fixes (CallAndMessage)"

This reverts commit 7a3b80a9b7.
This commit is contained in:
Filip Gawin
2021-01-31 21:06:38 +01:00
parent 7a3b80a9b7
commit 3d4791f291
15 changed files with 49 additions and 139 deletions

View File

@ -504,9 +504,6 @@ CEntity::Add(void)
case ENTITY_TYPE_DUMMY:
list = &s->m_lists[ENTITYLIST_DUMMIES_OVERLAP];
break;
#ifdef FIX_BUGS
default: debug("This shouldn't happen"); return;
#endif
}
list->InsertItem(this);
}
@ -567,9 +564,6 @@ CEntity::Remove(void)
case ENTITY_TYPE_DUMMY:
list = &s->m_lists[ENTITYLIST_DUMMIES_OVERLAP];
break;
#ifdef FIX_BUGS
default: debug("This shouldn't happen"); return;
#endif
}
list->RemoveItem(this);
}

View File

@ -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