1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Allocate MapBlock::m_node_metadata on heap to allow less header bloat

This commit is contained in:
Perttu Ahola 2011-11-13 12:54:33 +02:00
parent 64fa59e24f
commit 3b77a63d5d
6 changed files with 19 additions and 14 deletions

View file

@ -31,6 +31,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "profiler.h"
#include "scriptapi.h"
#include "mapnode_contentfeatures.h"
#include "nodemetadata.h"
#define PP(x) "("<<(x).X<<","<<(x).Y<<","<<(x).Z<<")"
@ -607,7 +608,7 @@ void ServerEnvironment::activateBlock(MapBlock *block, u32 additional_dtime)
activateObjects(block);
// Run node metadata
bool changed = block->m_node_metadata.step((float)dtime_s);
bool changed = block->m_node_metadata->step((float)dtime_s);
if(changed)
{
MapEditEvent event;
@ -917,7 +918,7 @@ void ServerEnvironment::step(float dtime)
block->setTimestampNoChangedFlag(m_game_time);
// Run node metadata
bool changed = block->m_node_metadata.step(dtime);
bool changed = block->m_node_metadata->step(dtime);
if(changed)
{
MapEditEvent event;