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.270 by root, Sat Dec 27 02:31:19 2008 UTC vs.
Revision 1.274 by root, Sun Dec 28 03:58:36 2008 UTC

32#include <bitset> 32#include <bitset>
33 33
34UUID UUID::cur; 34UUID UUID::cur;
35static uint64_t seq_next_save; 35static uint64_t seq_next_save;
36static const uint64 UUID_GAP = 1<<19; 36static const uint64 UUID_GAP = 1<<19;
37uint32_t mapspace::smellcount = 10000;
37 38
38objectvec objects; 39objectvec objects;
39activevec actives; 40activevec actives;
40 41
41short freearr_x[SIZEOFFREE] = { 42short freearr_x[SIZEOFFREE] = {
1096 1097
1097 if (object *pl = ms.player ()) 1098 if (object *pl = ms.player ())
1098 { 1099 {
1099 if (is_player ()) 1100 if (is_player ())
1100 { 1101 {
1102 if (!flag [FLAG_WIZPASS])
1101 ms.smell = pticks; // remember the smell of the player 1103 ms.smell = ++mapspace::smellcount; // remember the smell of the player
1102 1104
1103 // leaving a spot always closes any open container on the ground 1105 // leaving a spot always closes any open container on the ground
1104 if (container && !container->env) 1106 if (container && !container->env)
1105 // this causes spurious floorbox updates, but it ensures 1107 // this causes spurious floorbox updates, but it ensures
1106 // that the CLOSE event is being sent. 1108 // that the CLOSE event is being sent.
1284 1286
1285 /* Ideally, the caller figures this out. However, it complicates a lot 1287 /* Ideally, the caller figures this out. However, it complicates a lot
1286 * 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
1287 * need extra work 1289 * need extra work
1288 */ 1290 */
1291 maptile *newmap = m;
1289 if (!xy_normalise (m, op->x, op->y)) 1292 if (!xy_normalise (newmap, op->x, op->y))
1290 { 1293 {
1291 op->head_ ()->destroy ();// remove head_ once all tail object destroyers found 1294 op->head_ ()->destroy ();// remove head_ once all tail object destroyers found
1292 return 0; 1295 return 0;
1293 } 1296 }
1294 1297
1296 if (!insert_ob_in_map (more, m, originator, flag)) 1299 if (!insert_ob_in_map (more, m, originator, flag))
1297 return 0; 1300 return 0;
1298 1301
1299 CLEAR_FLAG (op, FLAG_REMOVED); 1302 CLEAR_FLAG (op, FLAG_REMOVED);
1300 1303
1301 op->map = m; 1304 op->map = newmap;
1302 mapspace &ms = op->ms (); 1305 mapspace &ms = op->ms ();
1303 1306
1304 /* this has to be done after we translate the coordinates. 1307 /* this has to be done after we translate the coordinates.
1305 */ 1308 */
1306 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