About Store Forum Documentation Contact



Post Reply 
Game::World.path()
Author Message
fatcoder Offline
Member

Post: #1
Game::World.path()
Is there a reason why the default PathWorld returned by Game::World.path() is const?

We can create our own worlds using Game::World.New() and then set our own areas, but then we can't update the PathWorld in it to use the custom areas.

I would like to be able to call Game::World.path().set(...) to set the path mesh for an area.
12-08-2011 08:17 AM
Find all posts by this user Quote this message in a reply
fatcoder Offline
Member

Post: #2
RE: Game::World.path()
Any world on this one Esenthel? Possible, not possible?
12-10-2011 01:15 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #3
RE: Game::World.path()
no, Game::World manager should handle the pathworld from Game::World only.
If you want custom PathWorld, you need to use custom PathWorld variable.
12-10-2011 01:28 PM
Find all posts by this user Quote this message in a reply
fatcoder Offline
Member

Post: #4
RE: Game::World.path()
Even in the case where using Game::WORLD_MANUAL and fully building and controling your own world? In that case we should be able to control the world's default PathWorld as well, no? You would just need to remove the const from it right? Seems silly that we have a perfectly good empty PathWorld in Game::World that we can't use, which would be saved and loaded for us automatically.
(This post was last modified: 12-11-2011 12:11 AM by fatcoder.)
12-11-2011 12:02 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #5
RE: Game::World.path()
yes, in case of custom worlds pathworld should be customizable

temporarily you can use this function to remove const modifier on object:
T1(TYPE) inline TYPE& ConstCast(C TYPE &x) {return (TYPE&)x;}
12-15-2011 02:52 PM
Find all posts by this user Quote this message in a reply
fatcoder Offline
Member

Post: #6
RE: Game::World.path()
Thanks. I'll try out your code.

Isn't it just a matter of removing the C from the World.path() method, or is there other internal stuff you need to look at?
12-16-2011 01:06 AM
Find all posts by this user Quote this message in a reply
Post Reply