Actually commit CWorld, fix CGameArea::Invalidate

This commit is contained in:
Phillip Stephens 2017-11-02 16:36:37 -07:00
parent d7cd8ee7e9
commit e98fc22a2c
2 changed files with 7 additions and 4 deletions

View File

@ -804,13 +804,16 @@ bool CGameArea::Invalidate(CStateManager* mgr)
if (xf0_24_postConstructed)
{
ClearTokenList();
/* TODO: Verify, not sure if I'm getting this right - Phil */
for (auto it = xf8_loadTransactions.begin(); it != xf8_loadTransactions.end(); )
{
if (!(*it)->IsComplete())
{
(*it)->PostCancelRequest();
else
it = xf8_loadTransactions.erase(it);
++it;
continue;
}
it = xf8_loadTransactions.erase(it);
}
if (xf8_loadTransactions.size() != 0)
return false;

View File

@ -440,7 +440,7 @@ void CWorld::TravelToArea(TAreaId aid, CStateManager& mgr, bool skipLoadOther)
CGameArea* toDeallocateAreas = x4c_chainHeads[0];
while (toDeallocateAreas)
{
if (toDeallocateAreas->Invalidate(mgr))
if (toDeallocateAreas->Invalidate(&mgr))
{
MoveToChain(toDeallocateAreas, EChain::Deallocated);
break;