i != m_players.end(); i++)
{
Player *player = *i;
+
+ v3f playerpos = player->getPosition();
// Apply physics to local player
if(player->isLocal())
*/
player->move(dtime_part, *m_map);
+ /*
+ Update lighting on remote players on client
+ */
+ u8 light = LIGHT_MAX;
+ try{
+ // Get node at feet
+ v3s16 p = floatToInt(playerpos + v3f(0,BS/4,0));
+ MapNode n = m_map->getNode(p);
+ light = n.getLightBlend(m_daynight_ratio);
+ }
+ catch(InvalidPositionException &e) {}
+ player->updateLight(light);
+
/*
Add footsteps to grass
*/
- //TimeTaker footsteptimer("footstep", g_device);
- // 0ms
- v3f playerpos = player->getPosition();
// Get node that is at BS/4 under player
v3s16 bottompos = floatToInt(playerpos + v3f(0,-BS/4,0));
try{
catch(InvalidPositionException &e)
{
}
- //footsteptimer.stop();
}
}
while(dtime > 0.001);