minor fixes

This commit is contained in:
Eduardo Bart 2012-03-30 06:51:34 -03:00
parent c13a5b5dab
commit fa3d60a00a
3 changed files with 4 additions and 2 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -231,12 +231,13 @@ void LocalPlayer::setExperience(double experience)
void LocalPlayer::setLevel(double level, double levelPercent) void LocalPlayer::setLevel(double level, double levelPercent)
{ {
if(m_level != level || m_levelPercent != m_levelPercent) { if(m_level != level || m_levelPercent != levelPercent) {
double oldLevel = m_level; double oldLevel = m_level;
double oldLevelPercent = m_levelPercent; double oldLevelPercent = m_levelPercent;
m_level = level; m_level = level;
m_levelPercent = levelPercent; m_levelPercent = levelPercent;
dump << "yeah";
callLuaField("onLevelChange", level, levelPercent, oldLevel, oldLevelPercent); callLuaField("onLevelChange", level, levelPercent, oldLevel, oldLevelPercent);
} }
} }

View File

@ -357,7 +357,8 @@ void MapView::updateVisibleTilesCache(int start)
if(stop) { if(stop) {
// schedule next update continuation // schedule next update continuation
m_updateTilesCacheEvent = g_eventDispatcher.addEvent(std::bind(&MapView::updateVisibleTilesCache, asMapView(), count)); // scheduling an event with delay 0 ensures that the its execution will be after next frame render
m_updateTilesCacheEvent = g_eventDispatcher.scheduleEvent(std::bind(&MapView::updateVisibleTilesCache, asMapView(), count), 0);
} }
if(start == 0) if(start == 0)
m_cachedFloorVisibleCreatures = g_map.getSpectators(cameraPosition, false); m_cachedFloorVisibleCreatures = g_map.getSpectators(cameraPosition, false);