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.272 by root, Sat Dec 27 04:09:58 2008 UTC vs.
Revision 1.274 by root, Sun Dec 28 03:58:36 2008 UTC

1097 1097
1098 if (object *pl = ms.player ()) 1098 if (object *pl = ms.player ())
1099 { 1099 {
1100 if (is_player ()) 1100 if (is_player ())
1101 { 1101 {
1102 if (!flag [FLAG_WIZPASS])
1102 ms.smell = ++mapspace::smellcount; // remember the smell of the player 1103 ms.smell = ++mapspace::smellcount; // remember the smell of the player
1103 1104
1104 // leaving a spot always closes any open container on the ground 1105 // leaving a spot always closes any open container on the ground
1105 if (container && !container->env) 1106 if (container && !container->env)
1106 // this causes spurious floorbox updates, but it ensures 1107 // this causes spurious floorbox updates, but it ensures
1107 // that the CLOSE event is being sent. 1108 // that the CLOSE event is being sent.
1285 1286
1286 /* Ideally, the caller figures this out. However, it complicates a lot 1287 /* Ideally, the caller figures this out. However, it complicates a lot
1287 * of areas of callers (eg, anything that uses find_free_spot would now 1288 * of areas of callers (eg, anything that uses find_free_spot would now
1288 * need extra work 1289 * need extra work
1289 */ 1290 */
1291 maptile *newmap = m;
1290 if (!xy_normalise (m, op->x, op->y)) 1292 if (!xy_normalise (newmap, op->x, op->y))
1291 { 1293 {
1292 op->head_ ()->destroy ();// remove head_ once all tail object destroyers found 1294 op->head_ ()->destroy ();// remove head_ once all tail object destroyers found
1293 return 0; 1295 return 0;
1294 } 1296 }
1295 1297
1297 if (!insert_ob_in_map (more, m, originator, flag)) 1299 if (!insert_ob_in_map (more, m, originator, flag))
1298 return 0; 1300 return 0;
1299 1301
1300 CLEAR_FLAG (op, FLAG_REMOVED); 1302 CLEAR_FLAG (op, FLAG_REMOVED);
1301 1303
1302 op->map = m; 1304 op->map = newmap;
1303 mapspace &ms = op->ms (); 1305 mapspace &ms = op->ms ();
1304 1306
1305 /* this has to be done after we translate the coordinates. 1307 /* this has to be done after we translate the coordinates.
1306 */ 1308 */
1307 if (op->nrof && !(flag & INS_NO_MERGE)) 1309 if (op->nrof && !(flag & INS_NO_MERGE))

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines