mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Record MapBlock modification reasons as flags instead of strings
This improves performance of MapBlock::raiseModified by a factor of 6. Also, clean up mapblock.h a bit and inline small functions.
This commit is contained in:
parent
4c9a8a91c4
commit
46684beec1
6 changed files with 294 additions and 241 deletions
|
@ -178,7 +178,7 @@ bool RollbackAction::applyRevert(Map *map, InventoryManager *imgr, IGameDef *gam
|
|||
MapBlock *block = map->getBlockNoCreateNoEx(blockpos);
|
||||
if (block) {
|
||||
block->raiseModified(MOD_STATE_WRITE_NEEDED,
|
||||
"NodeMetaRef::reportMetadataChange");
|
||||
MOD_REASON_REPORT_META_CHANGE);
|
||||
}
|
||||
} catch (InvalidPositionException &e) {
|
||||
infostream << "RollbackAction::applyRevert(): "
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue