aboutsummaryrefslogtreecommitdiff
path: root/src/mapsector.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mapsector.cpp')
-rw-r--r--src/mapsector.cpp18
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)
{
}