mirror of
https://github.com/GTAmodding/re3.git
synced 2025-10-07 12:30:33 +00:00
First batch of fixes (CallAndMessage)
This commit is contained in:
parent
5de4e88d7a
commit
7a3b80a9b7
15 changed files with 139 additions and 49 deletions
|
@ -504,6 +504,9 @@ 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);
|
||||
}
|
||||
|
@ -564,6 +567,9 @@ 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);
|
||||
}
|
||||
|
|
|
@ -126,6 +126,8 @@ CPhysical::Add(void)
|
|||
break;
|
||||
default:
|
||||
assert(0);
|
||||
debug("This shouldn't happen");
|
||||
return;
|
||||
}
|
||||
CPtrNode *node = list->InsertItem(this);
|
||||
assert(node);
|
||||
|
@ -191,17 +193,20 @@ CPhysical::RemoveAndAdd(void)
|
|||
list = &s->m_lists[ENTITYLIST_OBJECTS_OVERLAP];
|
||||
break;
|
||||
}
|
||||
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);
|
||||
}
|
||||
#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);
|
||||
}
|
||||
}
|
||||
|
||||
// Remove old nodes we no longer need
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue