mirror of https://github.com/AxioDL/metaforce.git
Add found resources to pool
This commit is contained in:
parent
18e34b4dce
commit
b647a0a543
|
@ -22,8 +22,12 @@ CToken CSimplePool::GetObj(const SObjectTag& tag, const CVParamTransfer& paramXf
|
||||||
// TODO: There is some logic missing here, need to figure out what it's doing
|
// TODO: There is some logic missing here, need to figure out what it's doing
|
||||||
CObjectReference* ret = new CObjectReference(*this, x30_factory.Build(tag, paramXfer), tag, paramXfer);
|
CObjectReference* ret = new CObjectReference(*this, x30_factory.Build(tag, paramXfer), tag, paramXfer);
|
||||||
if (ret->GetObject())
|
if (ret->GetObject())
|
||||||
|
{
|
||||||
|
x4_resources.push_back(std::make_pair<SObjectTag, CObjectReference*>((SObjectTag)tag, std::move(ret)));
|
||||||
return CToken(ret);
|
return CToken(ret);
|
||||||
|
}
|
||||||
|
|
||||||
|
delete ret;
|
||||||
return CToken();
|
return CToken();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue