camera_direction.rotateXZBy(camera_yaw);\r
\r
// This is at the height of the eyes of the current figure\r
- v3f camera_position =\r
- player_position + v3f(0, BS+BS/2, 0);\r
+ v3f camera_position = player_position + v3f(0, BS+BS/2, 0);\r
// This is more like in minecraft\r
- /*v3f camera_position =\r
- player_position + v3f(0, BS+BS*0.65, 0);*/\r
+ //v3f camera_position = player_position + v3f(0, BS+BS*0.625, 0);\r
\r
camera->setPosition(camera_position);\r
// *100.0 helps in large map coordinates\r
catch(con::PeerNotFoundException &e)\r
{\r
dstream<<DTIME<<"Connection timed out."<<std::endl;\r
- \r
- /*if(g_device)\r
- {\r
- GUIMessageMenu *menu =\r
- new GUIMessageMenu(guienv, guiroot, -1, \r
- &g_menumgr,\r
- L"Connection timed out");\r
-\r
- video::IVideoDriver* driver = g_device->getVideoDriver();\r
- \r
- dstream<<"Created menu"<<std::endl;\r
-\r
- while(g_device->run() && menu->getStatus() == false)\r
- {\r
- driver->beginScene(true, true, video::SColor(255,0,0,0));\r
- guienv->drawAll();\r
- driver->endScene();\r
- }\r
- \r
- dstream<<"Dropping menu"<<std::endl;\r
-\r
- menu->drop();\r
- }*/\r
+ error_message = L"Connection timed out.";\r
}\r
\r
} // Menu-game loop\r
list_plants_amount->addPoint(p, Attribute(plants_amount));*/
float plants_amount = 0;
- if(myrand()%5 == 0)
+ if(myrand()%4 == 0)
{
plants_amount = 1.5;
}
n.d = CONTENT_LEAVES;
- if(rand()%4!=0) sector->setNode(gp+v3s16(0,5,0), n);
+ if(myrand()%4!=0) sector->setNode(gp+v3s16(0,5,0), n);
- if(rand()%3!=0) sector->setNode(gp+v3s16(-1,5,0), n);
- if(rand()%3!=0) sector->setNode(gp+v3s16(1,5,0), n);
- if(rand()%3!=0) sector->setNode(gp+v3s16(0,5,-1), n);
- if(rand()%3!=0) sector->setNode(gp+v3s16(0,5,1), n);
- /*if(rand()%3!=0) sector->setNode(gp+v3s16(1,5,1), n);
- if(rand()%3!=0) sector->setNode(gp+v3s16(-1,5,1), n);
- if(rand()%3!=0) sector->setNode(gp+v3s16(-1,5,-1), n);
- if(rand()%3!=0) sector->setNode(gp+v3s16(1,5,-1), n);*/
+ if(myrand()%3!=0) sector->setNode(gp+v3s16(-1,5,0), n);
+ if(myrand()%3!=0) sector->setNode(gp+v3s16(1,5,0), n);
+ if(myrand()%3!=0) sector->setNode(gp+v3s16(0,5,-1), n);
+ if(myrand()%3!=0) sector->setNode(gp+v3s16(0,5,1), n);
+ /*if(myrand()%3!=0) sector->setNode(gp+v3s16(1,5,1), n);
+ if(myrand()%3!=0) sector->setNode(gp+v3s16(-1,5,1), n);
+ if(myrand()%3!=0) sector->setNode(gp+v3s16(-1,5,-1), n);
+ if(myrand()%3!=0) sector->setNode(gp+v3s16(1,5,-1), n);*/
sector->setNode(gp+v3s16(0,4,0), n);
sector->setNode(gp+v3s16(-1,3,-1), n);
sector->setNode(gp+v3s16(1,3,-1), n);
- if(rand()%3!=0) sector->setNode(gp+v3s16(-1,2,0), n);
- if(rand()%3!=0) sector->setNode(gp+v3s16(1,2,0), n);
- if(rand()%3!=0) sector->setNode(gp+v3s16(0,2,-1), n);
- if(rand()%3!=0) sector->setNode(gp+v3s16(0,2,1), n);
- /*if(rand()%3!=0) sector->setNode(gp+v3s16(1,2,1), n);
- if(rand()%3!=0) sector->setNode(gp+v3s16(-1,2,1), n);
- if(rand()%3!=0) sector->setNode(gp+v3s16(-1,2,-1), n);
- if(rand()%3!=0) sector->setNode(gp+v3s16(1,2,-1), n);*/
+ if(myrand()%3!=0) sector->setNode(gp+v3s16(-1,2,0), n);
+ if(myrand()%3!=0) sector->setNode(gp+v3s16(1,2,0), n);
+ if(myrand()%3!=0) sector->setNode(gp+v3s16(0,2,-1), n);
+ if(myrand()%3!=0) sector->setNode(gp+v3s16(0,2,1), n);
+ /*if(myrand()%3!=0) sector->setNode(gp+v3s16(1,2,1), n);
+ if(myrand()%3!=0) sector->setNode(gp+v3s16(-1,2,1), n);
+ if(myrand()%3!=0) sector->setNode(gp+v3s16(-1,2,-1), n);
+ if(myrand()%3!=0) sector->setNode(gp+v3s16(1,2,-1), n);*/
// Objects are identified by wanted position
objects_to_remove.push_back(p);