Harry
Member
|
Clearing object types container
I have following case: I have single world, which can be run in two modes. First mode requires full set of object types (for instance Items and Characters), while second requires a subset of object types (for instance only Items).
When creating World in first mode I set all object types using setObjType method. But when deleting World only objects in ObjMap are cleared. So I can't load world only for subset of object types, it will always load the types defined in first world creation.
For now the only workaround seems to be the creation of new instance of WorldManager.
|
|
02-29-2020 10:26 PM |
|
Esenthel
Administrator
|
RE: Clearing object types container
|
|
03-01-2020 04:27 AM |
|
Harry
Member
|
RE: Clearing object types container
Cool, thank you.
EDIT:
unfortunately the project don't compile after the changes:
Code:
error C2783: 'EE::Game::WorldManager &EE::Game::WorldManager::clearObjType(Int)': could not deduce template argument for 'TYPE'
Code:
error C2664: 'EE::Game::WorldManager &EE::Game::WorldManager::_setObjType(EE::Game::ObjMap<EE::Game::Obj> *,Int,CPtr)': cannot convert argument 1 from 'EE::Game::ObjMap<Static> *' to 'EE::Game::ObjMap<EE::Game::Obj> *'
|
|
03-01-2020 11:55 AM |
|
Esenthel
Administrator
|
RE: Clearing object types container
|
|
03-01-2020 01:36 PM |
|
Harry
Member
|
RE: Clearing object types container
Hi, thanks but it does not fix the second issue.
There is a problem in setObjType method which cannot cast ObjMap<TYPE>* to ObjMap<Obj>*.
|
|
03-01-2020 07:12 PM |
|
Esenthel
Administrator
|
RE: Clearing object types container
|
|
03-02-2020 02:04 AM |
|
Harry
Member
|
RE: Clearing object types container
Yes it is fine now, thanks.
|
|
03-03-2020 09:33 PM |
|