Fix choppy sky animation

This commit is contained in:
kaetemi 2014-12-12 01:22:18 +01:00
parent 563c905942
commit 80c5d6b1a1
2 changed files with 4 additions and 1 deletions

View file

@ -371,6 +371,9 @@ void displayDebug()
// Current GameCycle
TextContext->printfAt(1.f, line, "Ms per Cycle : %d", NetMngr.getMsPerTick());
line += lineStep;
// Smoothed Client Date
TextContext->printfAt(1.f, line, "Smoothed Client Date : %u %f", SmoothedClientDate.Day, SmoothedClientDate.Hour);
line += lineStep;
// Packet Loss
TextContext->printfAt(1.f, line, "Packet Loss : %.1f %%", NetMngr.getMeanPacketLoss()*100.0f);
line += lineStep;

View file

@ -235,7 +235,7 @@ uint CSky::setup(const CClientDate &date, const CClientDate &animationDate, floa
// animate objects
if (_PlayListManager)
{
double globalDate = ((double) _NumHourInDay * date.Day + (double) date.Hour) / _NumHourInDay;
double globalDate = (double)date.Hour / (double)_NumHourInDay;
//nlinfo("global date = %f", (float) globalDate);
_PlayListManager->animate(_AnimLengthInSeconds * globalDate);
}