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.217 by root, Wed Apr 23 07:13:23 2008 UTC vs.
Revision 1.218 by root, Wed Apr 23 07:25:54 2008 UTC

1149 * removed (most likely destroyed), update the player view 1149 * removed (most likely destroyed), update the player view
1150 * appropriately. 1150 * appropriately.
1151 */ 1151 */
1152 pl->close_container (); 1152 pl->close_container ();
1153 1153
1154 //TODO: the floorbox prev/next might need updating
1154 esrv_del_item (pl, count); 1155 esrv_del_item (pl->contr, count);
1155 } 1156 }
1156 1157
1157 for (tmp = ms.bot; tmp; tmp = tmp->above) 1158 for (tmp = ms.bot; tmp; tmp = tmp->above)
1158 { 1159 {
1159 /* No point updating the players look faces if he is the object 1160 /* No point updating the players look faces if he is the object
1285object * 1286object *
1286insert_ob_in_map (object *op, maptile *m, object *originator, int flag) 1287insert_ob_in_map (object *op, maptile *m, object *originator, int flag)
1287{ 1288{
1288 assert (!op->flag [FLAG_FREED]); 1289 assert (!op->flag [FLAG_FREED]);
1289 1290
1290 object *top, *floor = NULL;
1291
1292 op->remove (); 1291 op->remove ();
1293 1292
1294 /* Ideally, the caller figures this out. However, it complicates a lot 1293 /* Ideally, the caller figures this out. However, it complicates a lot
1295 * of areas of callers (eg, anything that uses find_free_spot would now 1294 * of areas of callers (eg, anything that uses find_free_spot would now
1296 * need extra work 1295 * need extra work
1314 */ 1313 */
1315 if (op->nrof && !(flag & INS_NO_MERGE)) 1314 if (op->nrof && !(flag & INS_NO_MERGE))
1316 for (object *tmp = ms.bot; tmp; tmp = tmp->above) 1315 for (object *tmp = ms.bot; tmp; tmp = tmp->above)
1317 if (object::can_merge (op, tmp)) 1316 if (object::can_merge (op, tmp))
1318 { 1317 {
1318 // TODO: we atcually want to update tmp, not op,
1319 // but some caller surely breaks when we return tmp
1320 // from here :/
1319 op->nrof += tmp->nrof; 1321 op->nrof += tmp->nrof;
1320 tmp->destroy (1); 1322 tmp->destroy (1);
1321 } 1323 }
1322 1324
1323 CLEAR_FLAG (op, FLAG_APPLIED); /* hack for fixing F_APPLIED in items of dead people */ 1325 CLEAR_FLAG (op, FLAG_APPLIED); /* hack for fixing F_APPLIED in items of dead people */
1345 /* since *below* originator, no need to update top */ 1347 /* since *below* originator, no need to update top */
1346 originator->below = op; 1348 originator->below = op;
1347 } 1349 }
1348 else 1350 else
1349 { 1351 {
1352 object *top, *floor = NULL;
1353
1350 top = ms.bot; 1354 top = ms.bot;
1351 1355
1352 /* If there are other objects, then */ 1356 /* If there are other objects, then */
1353 if (top) 1357 if (top)
1354 { 1358 {
1453 } 1457 }
1454 1458
1455 op->map->dirty = true; 1459 op->map->dirty = true;
1456 1460
1457 if (object *pl = ms.player ()) 1461 if (object *pl = ms.player ())
1462 //TODO: the floorbox prev/next might need updating
1458 esrv_send_item (pl, op); 1463 esrv_send_item (pl, op);
1459 1464
1460 /* If this object glows, it may affect lighting conditions that are 1465 /* If this object glows, it may affect lighting conditions that are
1461 * visible to others on this map. But update_all_los is really 1466 * visible to others on this map. But update_all_los is really
1462 * an inefficient way to do this, as it means los for all players 1467 * an inefficient way to do this, as it means los for all players

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines