mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 08:35:20 +02:00
GameDef compiles
This commit is contained in:
@@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user