diff options
author | Perttu Ahola <celeron55@gmail.com> | 2011-11-14 21:41:30 +0200 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2011-11-29 19:13:42 +0200 |
commit | c6fd2986d4261cf742d3bc21e8c12be59ab89f95 (patch) | |
tree | ef6ce8210f7f017bce42a024b75a44e73b5ab139 /src/mapsector.cpp | |
parent | abceeee92f99b84ebb79968269835a4f509bfb90 (diff) | |
download | minetest-c6fd2986d4261cf742d3bc21e8c12be59ab89f95.tar.gz minetest-c6fd2986d4261cf742d3bc21e8c12be59ab89f95.tar.bz2 minetest-c6fd2986d4261cf742d3bc21e8c12be59ab89f95.zip |
GameDef compiles
Diffstat (limited to 'src/mapsector.cpp')
-rw-r--r-- | src/mapsector.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/mapsector.cpp b/src/mapsector.cpp index 4a526c412..9b5432807 100644 --- a/src/mapsector.cpp +++ b/src/mapsector.cpp @@ -23,10 +23,11 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "exceptions.h" #include "mapblock.h" -MapSector::MapSector(Map *parent, v2s16 pos): +MapSector::MapSector(Map *parent, v2s16 pos, IGameDef *gamedef): differs_from_disk(false), m_parent(parent), m_pos(pos), + m_gamedef(gamedef), m_block_cache(NULL) { } @@ -89,7 +90,7 @@ MapBlock * MapSector::createBlankBlockNoInsert(s16 y) v3s16 blockpos_map(m_pos.X, y, m_pos.Y); - MapBlock *block = new MapBlock(m_parent, blockpos_map); + MapBlock *block = new MapBlock(m_parent, blockpos_map, m_gamedef); return block; } @@ -151,8 +152,8 @@ void MapSector::getBlocks(core::list<MapBlock*> &dest) ServerMapSector */ -ServerMapSector::ServerMapSector(Map *parent, v2s16 pos): - MapSector(parent, pos) +ServerMapSector::ServerMapSector(Map *parent, v2s16 pos, IGameDef *gamedef): + MapSector(parent, pos, gamedef) { } @@ -186,7 +187,8 @@ ServerMapSector* ServerMapSector::deSerialize( std::istream &is, Map *parent, v2s16 p2d, - core::map<v2s16, MapSector*> & sectors + core::map<v2s16, MapSector*> & sectors, + IGameDef *gamedef ) { /* @@ -229,7 +231,7 @@ ServerMapSector* ServerMapSector::deSerialize( } else { - sector = new ServerMapSector(parent, p2d); + sector = new ServerMapSector(parent, p2d, gamedef); sectors.insert(p2d, sector); } @@ -247,8 +249,8 @@ ServerMapSector* ServerMapSector::deSerialize( ClientMapSector */ -ClientMapSector::ClientMapSector(Map *parent, v2s16 pos): - MapSector(parent, pos) +ClientMapSector::ClientMapSector(Map *parent, v2s16 pos, IGameDef *gamedef): + MapSector(parent, pos, gamedef) { } |