ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/server/weather.C
(Generate patch)

Comparing deliantra/server/server/weather.C (file contents):
Revision 1.12 by root, Wed Dec 27 09:28:02 2006 UTC vs.
Revision 1.13 by root, Wed Dec 27 13:13:47 2006 UTC

384 * forward. Every 20 ticks, the clock is saved to disk. It is also 384 * forward. Every 20 ticks, the clock is saved to disk. It is also
385 * saved on shutdown. Any time dependant functions should be called 385 * saved on shutdown. Any time dependant functions should be called
386 * from this function, and probably be passed tod as an argument. 386 * from this function, and probably be passed tod as an argument.
387 * Please don't modify tod in the dependant function. 387 * Please don't modify tod in the dependant function.
388 */ 388 */
389
390void 389void
391tick_the_clock (void) 390tick_the_clock (void)
392{ 391{
393 timeofday_t tod; 392 timeofday_t tod;
394 393
395 todtick++; 394 todtick++;
396 if (todtick % 20 == 0) 395 if (todtick % 20 == 0)
397 write_todclock (); 396 write_todclock ();
397
398 if (settings.dynamiclevel > 0) 398 if (settings.dynamiclevel > 0)
399 { 399 {
400 if (todtick % 21 == 0) 400 if (todtick % 21 == 0)
401 write_pressuremap (); 401 write_pressuremap ();
402 if (todtick % 22 == 0) 402 if (todtick % 22 == 0)
415 if (todtick % 28 == 0) 415 if (todtick % 28 == 0)
416 write_skymap (); 416 write_skymap ();
417 if (todtick % 29 == 0) 417 if (todtick % 29 == 0)
418 write_rainfallmap (); 418 write_rainfallmap ();
419 } 419 }
420
420 get_tod (&tod); 421 get_tod (&tod);
421 dawn_to_dusk (&tod); 422 dawn_to_dusk (&tod);
422 /* call the weather calculators, here, in order */ 423 /* call the weather calculators, here, in order */
423 if (settings.dynamiclevel > 0) 424 if (settings.dynamiclevel > 0)
424 { 425 {
429 init_temperature (); 430 init_temperature ();
430 compute_sky (); 431 compute_sky ();
431 if (tod.hour == 0) 432 if (tod.hour == 0)
432 process_rain (); 433 process_rain ();
433 } 434 }
435
434 /* perform_weather must follow calculators */ 436 /* perform_weather must follow calculators */
435 perform_weather (); 437 perform_weather ();
436 if (settings.dynamiclevel > 0) 438 if (settings.dynamiclevel > 0)
437 { 439 {
438 write_weather_images (); 440 write_weather_images ();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines