mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00: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:
parent
bb59a8543d
commit
caf8d2a9d1
3 changed files with 36 additions and 17 deletions
|
@ -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;
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue