]> git.lizzy.rs Git - minetest.git/commitdiff
Maybe fixed the flood of "WARNING: StaticObjectList::remove(): id=13 not found" style...
authorPerttu Ahola <celeron55@gmail.com>
Thu, 28 Apr 2011 21:29:34 +0000 (00:29 +0300)
committerPerttu Ahola <celeron55@gmail.com>
Thu, 28 Apr 2011 21:29:34 +0000 (00:29 +0300)
src/main.cpp
src/server.cpp

index 2122985633bb05f010b5ad97cec3d912f10accdf..edfbc11c3f37aa935b9d3b190766ec4c55e634cc 100644 (file)
@@ -81,18 +81,75 @@ SUGG: Calculate lighting per vertex to get a lighting effect like in
 SUGG: Background music based on cellular automata?\r
       http://www.earslap.com/projectslab/otomata\r
 \r
+Storyline:\r
+----------\r
+NOTE: If you read the text below, PLEASE DON'T TELL ANYTHING ABOUT IT TO\r
+ANYONE, EVEN OF THE EXISTENCE OF IT. I WILL BE VERY DISAPPOINTED IF I SEE\r
+PEOPLE ON THE INTERNET TALKING ABOUT THIS AND IT WILL TAKE AT LEAST HALF\r
+OF MY MOTIVATION AWAY.\r
+\r
+At the beginning, there is a sky city (like in CT), in wich is a library\r
+(The Important Library), a part of which explodes. Unfortunately the\r
+magical Important Book in the library gets thrown out in the wind and flies\r
+far away to the dangerous Low Lands. The book is shown to glow in blue when\r
+flying in the wind in some animation, when the wind flies it to the\r
+horizon. It is early morning and quicky sunrise takes the place of the blue\r
+glow. This marks the direction where the book is.\r
+\r
+The rulers of the sky city choose to let some brave young men go and start\r
+a mission to get the book back. The rulers still have some magic so they\r
+can let them fall onto the ground without damage, but not further. When a\r
+new player spawns, he will just be an another missioner.\r
+\r
+The Low Lands are a very dangerous and a tough place to be in, but\r
+immediately underneath the sky city there is fairly peaceful, but sometimes\r
+dangerous creatures come there too, especially at night.\r
+\r
+The far ancestors of the highlanders lived in the lowlands, but then they\r
+learned magic and went to live in the sky. They have really no idea and no\r
+tools to survive in the lowlands. One guy is known to have dropped down to\r
+the lowlands a long time ago, but it is not known if he survived.\r
+\r
+The missioners will have to find out how to survive in the lowlands by\r
+finding materials and crafting tools and weapons and armor and interesting\r
+items. As they build up their capabilities, they can go and explore the\r
+lowlands further.\r
+\r
+The main flying direction of the book is known from the beginning. The book\r
+will have ended up in anywhere, but quite far in any case. A few or ten\r
+kilometers probably.\r
+\r
+The book might just lie on the ground but usually some evil castle lord\r
+will have hidden it in his castle. There are fairly many peaceful people\r
+in the lowlands, and the missioners can talk to them. They will sometimes\r
+tell some rumours of the book. "The Important Book? One guy going by told\r
+me it was seen falling from the highlands, probably towards the town of\r
+Clystaleon." (eh, just a random name I just made up)\r
+\r
+The map would of course be generated randomly, with some small towns and\r
+roads. Roads will occasionally have some road signs.\r
+\r
+But of course there will be monsters, especially at night. At the location\r
+of the book, there will usually be very little chance to survive without\r
+diamond armor and weapons, at least when the book has been stored by the\r
+evil castle lord. Useful rare minerals and items will be found only in\r
+areas of dangerous monsters.\r
+\r
+There is a blue glow coming from the book, which is a blue circle with a\r
+radius of 30m, and which is seen at a distance of 50 to 100m.\r
+\r
+When found, the book has to be transported back to beneath the sky city.\r
 \r
 Gaming ideas:\r
 -------------\r
 \r
 - Aim for something like controlling a single dwarf in Dwarf Fortress\r
-\r
 - The player could go faster by a crafting a boat, or riding an animal\r
-\r
 - Random NPC traders. what else?\r
 \r
 Game content:\r
 -------------\r
+\r
 - When furnace is destroyed, move items to player's inventory\r
 - Add lots of stuff\r
 - Glass blocks\r
index 322af2012ab9dca73dd2b8eee355a52cb6b393ed..e899443f44a05173b545b4d86ca7c7770e04e880 100644 (file)
@@ -4266,6 +4266,23 @@ void Server::handlePeerChange(PeerChange &c)
                // The client should exist
                assert(n != NULL);
                
+               /*
+                       Mark objects to be not known by the client
+               */
+               RemoteClient *client = n->getValue();
+               // Handle objects
+               for(core::map<u16, bool>::Iterator
+                               i = client->m_known_objects.getIterator();
+                               i.atEnd()==false; i++)
+               {
+                       // Get object
+                       u16 id = i.getNode()->getKey();
+                       ServerActiveObject* obj = m_env.getActiveObject(id);
+                       
+                       if(obj && obj->m_known_by_count > 0)
+                               obj->m_known_by_count--;
+               }
+
                // Collect information about leaving in chat
                std::wstring message;
                {