Server:\r
-------\r
\r
-TODO: When player dies, throw items on map\r
-\r
SUGG: Make an option to the server to disable building and digging near\r
the starting position\r
\r
* Make a small history check to transformLiquids to detect and log\r
continuous oscillations, in such detail that they can be fixed.\r
\r
+TODO: When player dies, throw items on map\r
+\r
Objects:\r
--------\r
\r
- A "near blocks" buffer, in which some nearby blocks are stored.\r
- For all blocks in the buffer, objects are stepped(). This\r
means they are active.\r
- - TODO: A global active buffer is needed for the server\r
- - TODO: A timestamp to blocks\r
- - TODO: All blocks going in and out of the buffer are recorded.\r
- - TODO: For outgoing blocks, timestamp is written.\r
- - TODO: For incoming blocks, time difference is calculated and\r
+ - A global active buffer is needed for the server\r
+ - A timestamp to blocks\r
+ - All blocks going in and out of the buffer are recorded.\r
+ - For outgoing blocks, timestamp is written.\r
+ - For incoming blocks, time difference is calculated and\r
objects are stepped according to it.\r
\r
- When an active object goes far from a player, either delete\r
b->updateMesh(daynight_ratio);
}
catch(InvalidPositionException &e){}
- /*// Trailing edge
- try{
- v3s16 p = blockpos + v3s16(1,0,0);
- MapBlock *b = getBlockNoCreate(p);
- b->updateMesh(daynight_ratio);
- }
- catch(InvalidPositionException &e){}
- try{
- v3s16 p = blockpos + v3s16(0,1,0);
- MapBlock *b = getBlockNoCreate(p);
- b->updateMesh(daynight_ratio);
- }
- catch(InvalidPositionException &e){}
- try{
- v3s16 p = blockpos + v3s16(0,0,1);
- MapBlock *b = getBlockNoCreate(p);
+}
+
+#if 0
+/*
+ Update mesh of block in which the node is, and if the node is at the
+ leading edge, update the appropriate leading blocks too.
+*/
+void ClientMap::updateNodeMeshes(v3s16 nodepos, u32 daynight_ratio)
+{
+ v3s16 dirs[4] = {
+ v3s16(0,0,0),
+ v3s16(-1,0,0),
+ v3s16(0,-1,0),
+ v3s16(0,0,-1),
+ };
+ v3s16 blockposes[4];
+ for(u32 i=0; i<4; i++)
+ {
+ v3s16 np = nodepos + dirs[i];
+ blockposes[i] = getNodeBlockPos(np);
+ // Don't update mesh of block if it has been done already
+ bool already_updated = false;
+ for(u32 j=0; j<i; j++)
+ {
+ if(blockposes[j] == blockposes[i])
+ {
+ already_updated = true;
+ break;
+ }
+ }
+ if(already_updated)
+ continue;
+ // Update mesh
+ MapBlock *b = getBlockNoCreate(blockposes[i]);
b->updateMesh(daynight_ratio);
}
- catch(InvalidPositionException &e){}*/
}
+#endif
void ClientMap::PrintInfo(std::ostream &out)
{