|
|
|
@ -18,28 +18,25 @@ namespace mwmp
|
|
|
|
|
|
|
|
|
|
virtual void Do(WorldstatePacket &packet, BaseWorldstate &worldstate)
|
|
|
|
|
{
|
|
|
|
|
if (isLocal())
|
|
|
|
|
{
|
|
|
|
|
MWBase::World *world = MWBase::Environment::get().getWorld();
|
|
|
|
|
|
|
|
|
|
if (worldstate.hour != -1)
|
|
|
|
|
world->setHour(worldstate.hour);
|
|
|
|
|
|
|
|
|
|
if (worldstate.day != -1)
|
|
|
|
|
world->setDay(worldstate.day);
|
|
|
|
|
|
|
|
|
|
if (worldstate.month != -1)
|
|
|
|
|
world->setMonth(worldstate.month);
|
|
|
|
|
|
|
|
|
|
if (worldstate.year != -1)
|
|
|
|
|
world->setYear(worldstate.year);
|
|
|
|
|
|
|
|
|
|
if (worldstate.daysPassed != -1)
|
|
|
|
|
world->setDaysPassed(worldstate.daysPassed);
|
|
|
|
|
|
|
|
|
|
if (worldstate.timeScale != -1)
|
|
|
|
|
world->setTimeScale(worldstate.timeScale);
|
|
|
|
|
}
|
|
|
|
|
MWBase::World *world = MWBase::Environment::get().getWorld();
|
|
|
|
|
|
|
|
|
|
if (worldstate.hour != -1)
|
|
|
|
|
world->setHour(worldstate.hour);
|
|
|
|
|
|
|
|
|
|
if (worldstate.day != -1)
|
|
|
|
|
world->setDay(worldstate.day);
|
|
|
|
|
|
|
|
|
|
if (worldstate.month != -1)
|
|
|
|
|
world->setMonth(worldstate.month);
|
|
|
|
|
|
|
|
|
|
if (worldstate.year != -1)
|
|
|
|
|
world->setYear(worldstate.year);
|
|
|
|
|
|
|
|
|
|
if (worldstate.daysPassed != -1)
|
|
|
|
|
world->setDaysPassed(worldstate.daysPassed);
|
|
|
|
|
|
|
|
|
|
if (worldstate.timeScale != -1)
|
|
|
|
|
world->setTimeScale(worldstate.timeScale);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|