mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 08:35:20 +02:00
Increase MapBlock::actuallyUpdateDayNightDiff() performance by 2-8x. ok @celeron55
Before patch, function consumes up to ~8% of the main server loop. After, ~0% (below level of 2 places of significance)
This commit is contained in:
@@ -192,6 +192,14 @@ struct MapNode
|
||||
}
|
||||
|
||||
void setLight(enum LightBank bank, u8 a_light, INodeDefManager *nodemgr);
|
||||
|
||||
/**
|
||||
* Check if the light value for night differs from the light value for day.
|
||||
*
|
||||
* @return If the light values are equal, returns true; otherwise false
|
||||
*/
|
||||
bool isLightDayNightEq(INodeDefManager *nodemgr) const;
|
||||
|
||||
u8 getLight(enum LightBank bank, INodeDefManager *nodemgr) const;
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user