PutkaRTS icon indicating copy to clipboard operation
PutkaRTS copied to clipboard

Game::Game: getPlayers() and getObjects() give non-const pointers

Open Metabolix opened this issue 14 years ago • 0 comments

The functions Game::Game::getPlayers() and Game::Game::getObjects() should return boost::shared_ptr<const X> so that the caller can't modify the players and objects.

However, it isn't very efficient to duplicate all object pointers. This will probably be fixed when we implement some better way to traverse the objects (e.g. by location, such as getObjectsNearSomething()).

Metabolix avatar Sep 11 '11 12:09 Metabolix