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

Comparing deliantra/server/common/map.C (file contents):
Revision 1.157 by root, Thu Jan 8 19:23:44 2009 UTC vs.
Revision 1.158 by root, Tue Feb 17 03:53:31 2009 UTC

334 if (IN_RANGE_EXC (op->x, 0, width) && IN_RANGE_EXC (op->y, 0, height)) 334 if (IN_RANGE_EXC (op->x, 0, width) && IN_RANGE_EXC (op->y, 0, height))
335 { 335 {
336 // we insert manually because 336 // we insert manually because
337 // a) its way faster 337 // a) its way faster
338 // b) we remove manually, too, and there are good reasons for that 338 // b) we remove manually, too, and there are good reasons for that
339 // c) its correct 339 // c) it's correct
340 mapspace &ms = at (op->x, op->y); 340 mapspace &ms = at (op->x, op->y);
341 341
342 op->flag [FLAG_REMOVED] = false; 342 op->flag [FLAG_REMOVED] = false;
343 343
344 op->above = 0; 344 op->above = 0;
345 op->below = ms.top; 345 op->below = ms.top;
346 346
347 if (ms.top)
348 ms.top->above = op; 347 *(ms.top ? &ms.top->above : &ms.bot) = op;
349 else
350 ms.bot = op;
351 348
352 ms.top = op; 349 ms.top = op;
353 ms.flags_ = 0; 350 ms.flags_ = 0;
354 } 351 }
355 else 352 else

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines