u16 l = getInteriorLight(n, 1, nodedef);
video::SColor c = MapBlock_LightColor(255, l, f.light_source);
- float s = BS / 2;
- for(u32 j = 0; j < 2; j++)
+ float s = BS / 2 * f.visual_scale;
+
+ for (int j = 0; j < 2; j++)
{
video::S3DVertex vertices[4] =
{
- video::S3DVertex(-s,-s, 0, 0,0,0, c, 0,1),
- video::S3DVertex( s,-s, 0, 0,0,0, c, 1,1),
- video::S3DVertex( s, s, 0, 0,0,0, c, 1,0),
- video::S3DVertex(-s, s, 0, 0,0,0, c, 0,0),
+ video::S3DVertex(-s,-BS/2, 0, 0,0,0, c, 0,1),
+ video::S3DVertex( s,-BS/2, 0, 0,0,0, c, 1,1),
+ video::S3DVertex( s,-BS/2 + s*2,0, 0,0,0, c, 1,0),
+ video::S3DVertex(-s,-BS/2 + s*2,0, 0,0,0, c, 0,0),
};
if(j == 0)
vertices[i].Pos.rotateXZBy(-44 + n.param2 * 2);
}
- for(u16 i = 0; i < 4; i++)
+ for (int i = 0; i < 4; i++)
{
vertices[i].Pos *= f.visual_scale;
- vertices[i].Pos.Y -= s * (1 - f.visual_scale);
+ if (f.visual_scale < 1)
+ vertices[i].Pos.Y -= BS/2 * (1 - f.visual_scale);
vertices[i].Pos += intToFloat(p, BS);
}