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

Comparing deliantra/server/server/main.C (file contents):
Revision 1.108 by root, Mon May 28 21:28:36 2007 UTC vs.
Revision 1.109 by root, Sun Jun 3 11:22:06 2007 UTC

241 flag = 0; 241 flag = 0;
242 for_all_players (pl) 242 for_all_players (pl)
243 { 243 {
244 pl->refcnt_chk (); 244 pl->refcnt_chk ();
245 245
246 if (!pl->ob || !pl->ns || !pl->ob->active) 246 if (expect_false (!pl->ob || !pl->ns || !pl->ob->active))
247 continue; 247 continue;
248 248
249 if (handle_newcs_player (pl->ob)) 249 if (handle_newcs_player (pl->ob))
250 flag = 1; 250 flag = 1;
251 } 251 }
253 253
254 for_all_players (pl) 254 for_all_players (pl)
255 { 255 {
256 object *ob = pl->ob; 256 object *ob = pl->ob;
257 257
258 if (!ob || !pl->ns || !ob->active) 258 if (expect_false (!ob || !pl->ns || !ob->active))
259 continue; 259 continue;
260 260
261 do_some_living (ob); 261 do_some_living (ob);
262 } 262 }
263} 263}
279 process_players1 (); 279 process_players1 ();
280 280
281 for_all_actives (op) 281 for_all_actives (op)
282 { 282 {
283 /* Now process op */ 283 /* Now process op */
284 if (QUERY_FLAG (op, FLAG_FREED)) 284 if (expect_false (QUERY_FLAG (op, FLAG_FREED)))
285 { 285 {
286 LOG (llevError, "BUG: process_events(): Free object on list\n"); 286 LOG (llevError, "BUG: process_events(): Free object on list\n");
287 op->set_speed (0); 287 op->set_speed (0);
288 continue; 288 continue;
289 } 289 }
290 290
291 if (!op->has_active_speed ()) 291 if (expect_false (!op->has_active_speed ()))
292 { 292 {
293 LOG (llevError, "BUG: process_events(): Object %s has no speed (%f), " 293 LOG (llevError, "BUG: process_events(): Object %s has no speed (%f), "
294 "but is on active list\n", op->debug_desc (), op->speed); 294 "but is on active list\n", op->debug_desc (), op->speed);
295 op->set_speed (0); 295 op->set_speed (0);
296 continue; 296 continue;
297 } 297 }
298 298
299 if (op->flag [FLAG_REMOVED]) 299 if (expect_false (op->flag [FLAG_REMOVED]))
300 { 300 {
301 LOG (llevError, "BUG: process_events(): removed object is on active list: %s\n", 301 LOG (llevError, "BUG: process_events(): removed object is on active list: %s\n",
302 op->debug_desc ()); 302 op->debug_desc ());
303 op->set_speed (0); 303 op->set_speed (0);
304 continue; 304 continue;
471 * doing the various things. 471 * doing the various things.
472 */ 472 */
473void 473void
474do_specials (void) 474do_specials (void)
475{ 475{
476 if (!(pticks % TICKS_PER_HOUR)) 476 if (expect_false (!(pticks % TICKS_PER_HOUR)))
477 adjust_daylight (); 477 adjust_daylight ();
478 478
479 if (!(pticks % 7)) 479 if (expect_false (!(pticks % 7)))
480 shstr::gc (); 480 shstr::gc ();
481 481
482 if (!(pticks % 2503)) 482 if (expect_false (!(pticks % 2503)))
483 fix_weight (); /* Hack to fix weightproblems caused by bugs */ 483 fix_weight (); /* Hack to fix weightproblems caused by bugs */
484 484
485 if (!(pticks % 5003)) 485 if (expect_false (!(pticks % 5003)))
486 write_book_archive (); 486 write_book_archive ();
487 487
488 if (!(pticks % 5009)) 488 if (expect_false (!(pticks % 5009)))
489 clean_friendly_list (); 489 clean_friendly_list ();
490 490
491 if (!(pticks % 5011)) 491 if (expect_false (!(pticks % 5011)))
492 obsolete_parties (); 492 obsolete_parties ();
493 493
494 if (!(pticks % 12503)) 494 if (expect_false (!(pticks % 12503)))
495 fix_luck (); 495 fix_luck ();
496} 496}
497 497
498void 498void
499server_tick () 499server_tick ()

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines