diff options
author | Perttu Ahola <celeron55@gmail.com> | 2011-04-06 10:28:39 +0300 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2011-04-06 10:28:39 +0300 |
commit | e56d1663378f155a4e398f1577ca1e8f484510b9 (patch) | |
tree | 1cebd335bcd193cd8a1a5cb1df8d18971da55673 /src | |
parent | 212f34db82c0a3ce5ee6dad3c45c3cc3ec9f8890 (diff) | |
download | minetest-e56d1663378f155a4e398f1577ca1e8f484510b9.tar.gz minetest-e56d1663378f155a4e398f1577ca1e8f484510b9.tar.bz2 minetest-e56d1663378f155a4e398f1577ca1e8f484510b9.zip |
Made mesh update on node addition asynchronous on client, to reduce frametime spikes
Diffstat (limited to 'src')
-rw-r--r-- | src/client.cpp | 5 | ||||
-rw-r--r-- | src/main.cpp | 11 |
2 files changed, 13 insertions, 3 deletions
diff --git a/src/client.cpp b/src/client.cpp index ae0e027c2..82e90704a 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -1800,14 +1800,15 @@ void Client::addNode(v3s16 p, MapNode n) catch(InvalidPositionException &e) {} - TimeTaker timer2("Client::addNode(): updateMeshes"); + //TimeTaker timer2("Client::addNode(): updateMeshes"); for(core::map<v3s16, MapBlock * >::Iterator i = modified_blocks.getIterator(); i.atEnd() == false; i++) { v3s16 p = i.getNode()->getKey(); - m_env.getClientMap().updateMeshes(p, m_env.getDayNightRatio()); + //m_env.getClientMap().updateMeshes(p, m_env.getDayNightRatio()); + addUpdateMeshTaskWithEdge(p); } } diff --git a/src/main.cpp b/src/main.cpp index b5247b907..521a80e4f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -116,6 +116,11 @@ Gaming ideas: Game content:
-------------
- Glass blocks
+- WHen furnace is destroyed, move items to player's inventory
+- Growing grass, decaying leaves
+ - This can be done in the active blocks I guess.
+ - Lots of stuff can be done in the active blocks.
+ - Uh, is there an active block list somewhere?
Documentation:
--------------
@@ -162,7 +167,7 @@ TODO: Make fetching sector's blocks more efficient when rendering TODO: Flowing water animation
-* Combine meshes to bigger ones in ClientMap and set them EHM_STATIC
+SUGG: Combine meshes to bigger ones in ClientMap and set them EHM_STATIC
SUGG: Draw cubes in inventory directly with 3D drawing commands, so that
animating them is easier.
@@ -190,6 +195,10 @@ SUGG: Add a "description" field to InventoryList and show it in GUIInventoryMenu
- If separate menus are made for everything, this is not needed
+TODO: See what is the main slowdown when a node is added or removed
+ and make it asynchronous at least for other players
+ - It probably is updateMeshes. How 'bout making it asynchronous?
+
Server:
-------
|