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

Comparing deliantra/server/common/object.C (file contents):
Revision 1.239 by root, Wed May 7 13:38:16 2008 UTC vs.
Revision 1.242 by elmex, Wed May 7 21:00:02 2008 UTC

1310 if (!QUERY_FLAG (op, FLAG_ALIVE)) 1310 if (!QUERY_FLAG (op, FLAG_ALIVE))
1311 CLEAR_FLAG (op, FLAG_NO_STEAL); 1311 CLEAR_FLAG (op, FLAG_NO_STEAL);
1312 1312
1313 if (flag & INS_BELOW_ORIGINATOR) 1313 if (flag & INS_BELOW_ORIGINATOR)
1314 { 1314 {
1315 if (originator->map != op->map || originator->x != op->x || originator->y != op->y || !originator->is_on_map ()) 1315 if (originator->map != op->map || originator->x != op->x || originator->y != op->y)
1316 { 1316 {
1317 LOG (llevError, "insert_ob_in_map called with INS_BELOW_ORIGINATOR when originator not on same space!\n"); 1317 LOG (llevError, "insert_ob_in_map called with INS_BELOW_ORIGINATOR when originator not on same space!\n");
1318 abort (); 1318 abort ();
1319 } 1319 }
1320
1321 if (!originator->is_on_map ())
1322 LOG (llevDebug | logBacktrace, "insert_ob_in_map(%s) called with INS_BELOW_ORIGINATOR when originator '%s' not on map",
1323 op->debug_desc (), originator->debug_desc ());
1320 1324
1321 op->above = originator; 1325 op->above = originator;
1322 op->below = originator->below; 1326 op->below = originator->below;
1323 originator->below = op; 1327 originator->below = op;
1324 1328
1391 } /* If objects on this space */ 1395 } /* If objects on this space */
1392 1396
1393 if (flag & INS_ABOVE_FLOOR_ONLY) 1397 if (flag & INS_ABOVE_FLOOR_ONLY)
1394 top = floor; 1398 top = floor;
1395 1399
1396 /* Top is the object that our object (op) is going to get inserted above. 1400 // insert object above top, or bottom-most if top = 0
1397 */
1398
1399 /* no top found, insert at bottom */
1400 if (!top) 1401 if (!top)
1401 { 1402 {
1402 op->below = 0; 1403 op->below = 0;
1403 op->above = ms.bot; 1404 op->above = ms.bot;
1404 ms.bot = op; 1405 ms.bot = op;
1405 1406
1406 *(op->above ? &op->above->below : &ms.top) = op; 1407 *(op->above ? &op->above->below : &ms.top) = op;
1407 } 1408 }
1408 else 1409 else
1409 { /* get inserted into the stack above top */ 1410 {
1410 op->above = top->above; 1411 op->above = top->above;
1411 top->above = op; 1412 top->above = op;
1412 1413
1413 op->below = top; 1414 op->below = top;
1414 *(op->above ? &op->above->below : &ms.top) = op; 1415 *(op->above ? &op->above->below : &ms.top) = op;
1415 } 1416 }
1416 } /* else not INS_BELOW_ORIGINATOR */ 1417 }
1417 1418
1418 if (op->type == PLAYER) 1419 if (op->type == PLAYER)
1419 { 1420 {
1420 op->contr->do_los = 1; 1421 op->contr->do_los = 1;
1421 ++op->map->players; 1422 ++op->map->players;
2416{ 2417{
2417 char flagdesc[512]; 2418 char flagdesc[512];
2418 char info2[256 * 4]; 2419 char info2[256 * 4];
2419 char *p = info; 2420 char *p = info;
2420 2421
2421 p += snprintf (p, 512, "{cnt:%d,uuid:%s,name:\"%s\"%s%s,flags:[%s],type:%d}", 2422 p += snprintf (p, 512, "{cnt:%d,uuid:%s,name:\"%s\"%s%s%s,flags:[%s],type:%d}",
2422 count, 2423 count,
2423 uuid.c_str (), 2424 uuid.c_str (),
2424 &name, 2425 &name,
2425 title ? "\",title:\"" : "", 2426 title ? ",title:\"" : "",
2426 title ? (const char *)title : "", 2427 title ? (const char *)title : "",
2428 title ? "\"" : "",
2427 flag_desc (flagdesc, 512), type); 2429 flag_desc (flagdesc, 512), type);
2428 2430
2429 if (!flag[FLAG_REMOVED] && env) 2431 if (!flag[FLAG_REMOVED] && env)
2430 p += snprintf (p, 256, "(in %s)", env->debug_desc (info2)); 2432 p += snprintf (p, 256, "(in %s)", env->debug_desc (info2));
2431 2433

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines