bigger & better teleports
This commit is contained in:
parent
b8c0827434
commit
2bbc75b593
Binary file not shown.
Before Width: | Height: | Size: 723 B After Width: | Height: | Size: 3.1 KiB |
@ -374,8 +374,9 @@ void mapblock_mesh_generate_special(MeshMakeData *data,
|
||||
|
||||
material.setTexture(0,ap.atlas);
|
||||
|
||||
u8 l = decode_light(n.getLightBlend(data->m_daynight_ratio));
|
||||
video::SColor c = MapBlock_LightColor(255, l);
|
||||
/*u8 l = decode_light(n.getLightBlend(data->m_daynight_ratio));
|
||||
video::SColor c = MapBlock_LightColor(255, l);*/
|
||||
video::SColor c(0xFFFFFFFF);
|
||||
|
||||
float d = (float)BS/16;
|
||||
// Wall at X+ of node
|
||||
@ -398,18 +399,24 @@ void mapblock_mesh_generate_special(MeshMakeData *data,
|
||||
|
||||
for(s32 i=0; i<4; i++)
|
||||
{
|
||||
if(dir == v3s16(1,0,0))
|
||||
vertices[i].Pos.rotateXZBy(0);
|
||||
if(dir == v3s16(-1,0,0))
|
||||
vertices[i].Pos.rotateXZBy(180);
|
||||
if(dir == v3s16(0,0,1))
|
||||
vertices[i].Pos.rotateXZBy(90);
|
||||
if(dir == v3s16(0,0,-1))
|
||||
vertices[i].Pos.rotateXZBy(-90);
|
||||
//horizontal - on floor
|
||||
if(dir == v3s16(0,-1,0))
|
||||
vertices[i].Pos.rotateXYBy(-90);
|
||||
if(dir == v3s16(0,1,0))
|
||||
else if(dir == v3s16(0,1,0))
|
||||
vertices[i].Pos.rotateXYBy(90);
|
||||
else{ //vertical - on wall
|
||||
if(dir == v3s16(1,0,0))
|
||||
vertices[i].Pos.rotateXZBy(0);
|
||||
else if(dir == v3s16(-1,0,0))
|
||||
vertices[i].Pos.rotateXZBy(180);
|
||||
else if(dir == v3s16(0,0,1))
|
||||
vertices[i].Pos.rotateXZBy(90);
|
||||
else if(dir == v3s16(0,0,-1))
|
||||
vertices[i].Pos.rotateXZBy(-90);
|
||||
//raise
|
||||
vertices[i].Pos.Y += BS/2;
|
||||
}
|
||||
|
||||
|
||||
vertices[i].Pos += intToFloat(p + blockpos_nodes, BS);
|
||||
}
|
||||
|
@ -710,7 +710,7 @@ void content_mapnode_init()
|
||||
f->setInventoryTexture("teleport.png");
|
||||
f->param_type = CPT_LIGHT;
|
||||
f->light_propagates = true;
|
||||
f->light_source = 3; //?
|
||||
f->light_source = LIGHT_MAX - 3;
|
||||
f->sunlight_propagates = true;
|
||||
f->solidness = 0; // drawn separately, makes no faces
|
||||
f->walkable = false;
|
||||
|
11
src/game.cpp
11
src/game.cpp
@ -463,6 +463,11 @@ void getPointedNode(Client *client, v3f player_position,
|
||||
|
||||
for(s32 i=0; i<2; i++)
|
||||
{
|
||||
if(dir == v3s16(0,-1,0))
|
||||
vertices[i].rotateXYBy(-90);
|
||||
else if(dir == v3s16(0,1,0))
|
||||
vertices[i].rotateXYBy(90);
|
||||
else{
|
||||
if(dir == v3s16(1,0,0))
|
||||
vertices[i].rotateXZBy(0);
|
||||
if(dir == v3s16(-1,0,0))
|
||||
@ -471,10 +476,8 @@ void getPointedNode(Client *client, v3f player_position,
|
||||
vertices[i].rotateXZBy(90);
|
||||
if(dir == v3s16(0,0,-1))
|
||||
vertices[i].rotateXZBy(-90);
|
||||
if(dir == v3s16(0,-1,0))
|
||||
vertices[i].rotateXYBy(-90);
|
||||
if(dir == v3s16(0,1,0))
|
||||
vertices[i].rotateXYBy(90);
|
||||
vertices[i].Y += BS/2;
|
||||
}
|
||||
|
||||
vertices[i] += npf;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user