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.144 by root, Thu Nov 19 04:30:46 2009 UTC vs.
Revision 1.146 by root, Sun Nov 29 10:55:18 2009 UTC

256 op->debug_desc ()); 256 op->debug_desc ());
257 op->set_speed (0); 257 op->set_speed (0);
258 continue; 258 continue;
259 } 259 }
260 260
261 //TODO: remove soon
262 if (expect_false (op->speed < 0.))
263 {
264 LOG (llevError, "BUG: process_events(): Object %s has negative speed (%f), "
265 "but is on active list\n", op->debug_desc (), op->speed);
266 op->speed = -op->speed;
267 continue;
268 }
269
261 /* Animate the object. Bug or feature that anim_speed 270 /* Animate the object. Bug or feature that anim_speed
262 * is based on ticks, and not the creatures speed? 271 * is based on ticks, and not the creatures speed?
263 */ 272 */
264 if (op->anim_speed && op->last_anim >= op->anim_speed) 273 if (op->anim_speed && op->last_anim >= op->anim_speed)
265 { 274 {
276 } 285 }
277 286
278 // this will destroy the speed_left value for players, but 287 // this will destroy the speed_left value for players, but
279 // process_players1 and ..2 save/restore the real value, 288 // process_players1 and ..2 save/restore the real value,
280 // so we can avoid a costly test here. 289 // so we can avoid a costly test here.
281 op->speed_left = min (abs (op->speed), op->speed_left + abs (op->speed)); 290 op->speed_left = min (op->speed, op->speed_left + op->speed);
282 } 291 }
283 292
284 process_players2 (); 293 process_players2 ();
285} 294}
286 295
371 * 380 *
372 * I also think this code makes it easier to see how often we really are 381 * I also think this code makes it easier to see how often we really are
373 * doing the various things. 382 * doing the various things.
374 */ 383 */
375static void 384static void
376do_specials (void) 385do_specials ()
377{ 386{
378 shstr::gc (); 387 shstr::gc ();
379 archetype::gc (); 388 archetype::gc ();
380 389
381 if (expect_false (!(pticks % TICKS_PER_HOUR))) 390 if (expect_false (!(pticks % TICKS_PER_HOUR)))

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines