12000 = midday
*/
{
- const s32 daylength = 8;
- const s32 nightlength = 2;
- const s32 daytimelength = 4;
+ const s32 daylength = 16;
+ const s32 nightlength = 6;
+ const s32 daytimelength = 8;
s32 d = daylength;
s32 t = (((m_time_of_day.get())%24000)/(24000/d));
u32 dr;
if(t < nightlength/2 || t >= d - nightlength/2)
- dr = 350;
+ dr = 400;
else if(t >= d/2 - daytimelength/2 && t < d/2 + daytimelength/2)
dr = 1000;
else
TODO: Change AttributeList to be 2D, as it would be too slow to search\r
in 3D fields anyway.\r
\r
-FIXME: The new pre-sunlight-propagation code messes up with initial\r
- water lighting. Does it any more?\r
-\r
TODO: Remove HMParams\r
\r
TODO: Flowing water to actually contain flow direction information\r
camera_direction.rotateXZBy(camera_yaw);\r
\r
// This is at the height of the eyes of the current figure\r
- v3f camera_position = 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 = player_position + v3f(0, BS+BS*0.625, 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
//TimeTaker //timer10("//timer10");\r
\r
video::SMaterial m;\r
- m.Thickness = 10;\r
+ //m.Thickness = 10;\r
+ m.Thickness = 3;\r
m.Lighting = false;\r
driver->setMaterial(m);\r
\r
{
struct PointWithAttr
{
- v3s16 p;
+ v2s16 p;
Attribute attr;
};
public:
~PointAttributeList()
{
- /*for(core::list<PointWithAttr>::Iterator
- i = m_points.begin();
- i != m_points.end(); i++)
- {
- PointWithAttr &pwa = *i;
- //delete pwa.attr;
- }*/
}
- Attribute getNearAttr(v3s16 p)
+ Attribute getNearAttr(v2s16 p)
{
core::list<PointWithAttr>::Iterator
nearest_i = m_points.end();
return nearest_i->attr;
}
- Attribute getNearAttr(v2s16 p)
+ Attribute getNearAttr(v3s16 p)
{
- return getNearAttr(v3s16(p.X, 0, p.Y));
+ return getNearAttr(v2s16(p.X, p.Z));
}
bool empty()
Take all points in range, or at least the nearest point,
and interpolate the values as floats
*/
- float getInterpolatedFloat(v3s16 p);
+ float getInterpolatedFloat(v2s16 p);
- float getInterpolatedFloat(v2s16 p)
+ float getInterpolatedFloat(v3s16 p)
{
- return getInterpolatedFloat(v3s16(p.X, 0, p.Y));
+ return getInterpolatedFloat(v2s16(p.X, p.Z));
}
- //float getInterpolatedFloat(v3s16 p, s32 range);
- /*float getInterpolatedFloat(v2s16 p, s32 range)
- {
- return getInterpolatedFloat(v3s16(p.X, 0, p.Y), range);
- }*/
-
- void addPoint(v3s16 p, const Attribute &attr)
+ void addPoint(v2s16 p, const Attribute &attr)
{
PointWithAttr pattr;
pattr.p = p;
m_points.push_back(pattr);
}
- void addPoint(v2s16 p, const Attribute &attr)
+ void addPoint(v3s16 p, const Attribute &attr)
{
- addPoint(v3s16(p.X, 0, p.Y), attr);
+ addPoint(v2s16(p.X, p.Z), attr);
}
private: