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.129 by root, Wed Sep 12 11:10:09 2007 UTC vs.
Revision 1.130 by root, Sun Sep 30 20:22:14 2007 UTC

317 if (object *op = object::read (f, this)) 317 if (object *op = object::read (f, this))
318 { 318 {
319 if (op->inv) 319 if (op->inv)
320 sum_weight (op); 320 sum_weight (op);
321 321
322 insert_ob_in_map (op, this, op, INS_NO_MERGE | INS_NO_WALK_ON | INS_ON_TOP | INS_MAP_LOAD); 322 if (IN_RANGE_EXC (op->x, 0, width) && IN_RANGE_EXC (op->y, 0, height))
323 {
324 // we insert manually because
325 // a) its way faster
326 // b) we remove manually, too, and there are good reasons for that
327 // c) its correct
328 mapspace &ms = at (op->x, op->y);
329
330 op->flag [FLAG_REMOVED] = false;
331
332 op->above = 0;
333 op->below = ms.top;
334
335 if (ms.top)
336 ms.top->above = op;
337 else
338 ms.bot = op;
339
340 ms.top = op;
341 ms.flags_ = 0;
342 }
343 else
344 {
345 f.parse_warn (format ("object %s out of range", op->debug_desc ()));
346 op->destroy ();
347 }
323 } 348 }
324 349
325 continue; 350 continue;
326 351
327 case KW_EOF: 352 case KW_EOF:

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines