mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 08:35:20 +02:00
Precalculate mapblock relative size. This permit to remove many s16 calculs on runtime
This commit is contained in:
@@ -69,6 +69,7 @@ static const char *modified_reason_strings[] = {
|
||||
MapBlock::MapBlock(Map *parent, v3s16 pos, IGameDef *gamedef, bool dummy):
|
||||
m_parent(parent),
|
||||
m_pos(pos),
|
||||
m_pos_relative(pos * MAP_BLOCKSIZE),
|
||||
m_gamedef(gamedef),
|
||||
m_modified(MOD_STATE_WRITE_NEEDED),
|
||||
m_modified_reason(MOD_REASON_INITIAL),
|
||||
|
Reference in New Issue
Block a user