| 1317 | } |
| 1318 | |
| 1319 | void World::SetDate(int year, int month, int day, int hour, int minute) |
| 1320 | { |
| 1321 | day--; |
| 1322 | for (int m = 0; m < month - 1; m++) |
| 1323 | { |
| 1324 | day += Poseidon::GetDaysInMonth(year, m); |
| 1325 | } |
| 1326 | float time = day * OneDay + hour * OneHour + minute * OneMinute + 0.5 * OneSecond; |
| 1327 | |
| 1328 | Glob.clock.SetTimeInYear(time); |
| 1329 | Glob.clock.SetTimeOfDay(hour, minute); |
| 1330 | Glob.clock.SetYear(year); |
| 1331 | |
| 1332 | LightSun* sun = _scene.MainLight(); |
| 1333 | sun->Recalculate(this); |
| 1334 | _scene.MainLightChanged(); |
| 1335 | } |
| 1336 | |
| 1337 | void World::ProcessNetwork() |
| 1338 | { |
no test coverage detected