some... stuff. dunno. 8-)
parent
07a759fdb8
commit
822621f792
|
@ -12,7 +12,7 @@
|
||||||
#wanted_fps = 30
|
#wanted_fps = 30
|
||||||
#fps_max = 60
|
#fps_max = 60
|
||||||
#viewing_range_nodes_max = 300
|
#viewing_range_nodes_max = 300
|
||||||
#viewing_range_nodes_min = 50
|
#viewing_range_nodes_min = 35
|
||||||
#screenW = 800
|
#screenW = 800
|
||||||
#screenH = 600
|
#screenH = 600
|
||||||
#host_game =
|
#host_game =
|
||||||
|
|
|
@ -124,8 +124,11 @@ void GUIPauseMenu::regenerateGui(v2u32 screensize)
|
||||||
wchar_t text[200];
|
wchar_t text[200];
|
||||||
swprintf(text, 200,
|
swprintf(text, 200,
|
||||||
L"Minetest-c55\n"
|
L"Minetest-c55\n"
|
||||||
|
L"by Perttu Ahola\n"
|
||||||
|
L"celeron55@gmail.com\n\n"
|
||||||
L"SER_FMT_VER_HIGHEST=%i\n"
|
L"SER_FMT_VER_HIGHEST=%i\n"
|
||||||
L"max_texture_size=\n(%i,%i)\n",
|
L"max_texture_size=\n(%i,%i)\n"
|
||||||
|
,
|
||||||
(int)SER_FMT_VER_HIGHEST,
|
(int)SER_FMT_VER_HIGHEST,
|
||||||
max_texture_size.X,
|
max_texture_size.X,
|
||||||
max_texture_size.Y
|
max_texture_size.Y
|
||||||
|
|
|
@ -120,17 +120,22 @@ video::ITexture * CrackTextureMod::make(video::ITexture *original,
|
||||||
assert(baseimage);
|
assert(baseimage);
|
||||||
|
|
||||||
video::ITexture *other = driver->getTexture("../data/crack.png");
|
video::ITexture *other = driver->getTexture("../data/crack.png");
|
||||||
|
|
||||||
|
dstream<<__FUNCTION_NAME<<": crack texture size is "
|
||||||
|
<<other->getSize().Width<<"x"
|
||||||
|
<<other->getSize().Height<<std::endl;
|
||||||
|
|
||||||
// We have to get the whole texture because getting a smaller area
|
// We have to get the whole texture because getting a smaller area
|
||||||
// messes the whole thing. It is probably a bug in Irrlicht.
|
// messes the whole thing. It is probably a bug in Irrlicht.
|
||||||
// NOTE: This doesn't work probably because some systems scale
|
// NOTE: This doesn't work probably because some systems scale
|
||||||
// the image to fit a texture or something...
|
// the image to fit a texture or something...
|
||||||
/*video::IImage *otherimage = driver->createImage(
|
|
||||||
other, core::position2d<s32>(0,0), other->getSize());*/
|
|
||||||
// This should work on more systems
|
|
||||||
video::IImage *otherimage = driver->createImage(
|
video::IImage *otherimage = driver->createImage(
|
||||||
|
other, core::position2d<s32>(0,0), other->getSize());
|
||||||
|
// This should work on more systems
|
||||||
|
// - no, it doesn't, output is more random.
|
||||||
|
/*video::IImage *otherimage = driver->createImage(
|
||||||
other, core::position2d<s32>(0,0),
|
other, core::position2d<s32>(0,0),
|
||||||
v2u32(16, CRACK_ANIMATION_LENGTH * 16));
|
v2u32(16, CRACK_ANIMATION_LENGTH * 16));*/
|
||||||
|
|
||||||
assert(otherimage);
|
assert(otherimage);
|
||||||
|
|
||||||
|
|
24
src/map.cpp
24
src/map.cpp
|
@ -1829,8 +1829,11 @@ MapBlock * ServerMap::emergeBlock(
|
||||||
MapBlock has a tunnel ended in its side
|
MapBlock has a tunnel ended in its side
|
||||||
*/
|
*/
|
||||||
|
|
||||||
v3f orp;
|
v3f orp(
|
||||||
s16 ors;
|
(float)(rand()%ued)+0.5,
|
||||||
|
(float)(rand()%ued)+0.5,
|
||||||
|
(float)(rand()%ued)+0.5
|
||||||
|
);
|
||||||
|
|
||||||
// Check z-
|
// Check z-
|
||||||
try
|
try
|
||||||
|
@ -1843,7 +1846,7 @@ MapBlock * ServerMap::emergeBlock(
|
||||||
if(getNode(ap).d == CONTENT_AIR)
|
if(getNode(ap).d == CONTENT_AIR)
|
||||||
{
|
{
|
||||||
orp = v3f(x+1,y+1,0);
|
orp = v3f(x+1,y+1,0);
|
||||||
ors = 4;
|
goto continue_generating;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1860,7 +1863,7 @@ MapBlock * ServerMap::emergeBlock(
|
||||||
if(getNode(ap).d == CONTENT_AIR)
|
if(getNode(ap).d == CONTENT_AIR)
|
||||||
{
|
{
|
||||||
orp = v3f(x+1,y+1,ued-1);
|
orp = v3f(x+1,y+1,ued-1);
|
||||||
ors = 4;
|
goto continue_generating;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1877,7 +1880,7 @@ MapBlock * ServerMap::emergeBlock(
|
||||||
if(getNode(ap).d == CONTENT_AIR)
|
if(getNode(ap).d == CONTENT_AIR)
|
||||||
{
|
{
|
||||||
orp = v3f(0,y+1,z+1);
|
orp = v3f(0,y+1,z+1);
|
||||||
ors = 4;
|
goto continue_generating;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1894,11 +1897,13 @@ MapBlock * ServerMap::emergeBlock(
|
||||||
if(getNode(ap).d == CONTENT_AIR)
|
if(getNode(ap).d == CONTENT_AIR)
|
||||||
{
|
{
|
||||||
orp = v3f(ued-1,y+1,z+1);
|
orp = v3f(ued-1,y+1,z+1);
|
||||||
ors = 4;
|
goto continue_generating;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch(InvalidPositionException &e){}
|
catch(InvalidPositionException &e){}
|
||||||
|
|
||||||
|
continue_generating:
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Generate some tunnel starting from orp and ors
|
Generate some tunnel starting from orp and ors
|
||||||
|
@ -1906,9 +1911,9 @@ MapBlock * ServerMap::emergeBlock(
|
||||||
for(u16 i=0; i<3; i++)
|
for(u16 i=0; i<3; i++)
|
||||||
{
|
{
|
||||||
v3f rp(
|
v3f rp(
|
||||||
(float)(rand()%(ued-1))+0.5,
|
(float)(rand()%ued)+0.5,
|
||||||
(float)(rand()%(ued-1))+0.5,
|
(float)(rand()%ued)+0.5,
|
||||||
(float)(rand()%(ued-1))+0.5
|
(float)(rand()%ued)+0.5
|
||||||
);
|
);
|
||||||
s16 min_d = 0;
|
s16 min_d = 0;
|
||||||
s16 max_d = 4;
|
s16 max_d = 4;
|
||||||
|
@ -1943,7 +1948,6 @@ MapBlock * ServerMap::emergeBlock(
|
||||||
}
|
}
|
||||||
|
|
||||||
orp = rp;
|
orp = rp;
|
||||||
ors = rs;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue