About Store Forum Documentation Contact
Donations:
167$/mo



Post Reply 
Clearing object types container
Author Message
Harry Offline
Member

Post: #1
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
Visit this user's website Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #2
RE: Clearing object types container
03-01-2020 04:27 AM
Find all posts by this user Quote this message in a reply
Harry Offline
Member

Post: #3
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
Visit this user's website Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #4
RE: Clearing object types container
03-01-2020 01:36 PM
Find all posts by this user Quote this message in a reply
Harry Offline
Member

Post: #5
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
Visit this user's website Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #6
RE: Clearing object types container
03-02-2020 02:04 AM
Find all posts by this user Quote this message in a reply
Harry Offline
Member

Post: #7
RE: Clearing object types container
Yes it is fine now, thanks.
03-03-2020 09:33 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply