minor fixes

master
Eduardo Bart 12 years ago
parent c13a5b5dab
commit fa3d60a00a

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

@ -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);
} }
} }

@ -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);

Loading…
Cancel
Save