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.243 by root, Sat May 17 00:17:02 2008 UTC vs.
Revision 1.244 by root, Sun May 18 17:52:53 2008 UTC

1241 * job preparing multi-part monsters. 1241 * job preparing multi-part monsters.
1242 */ 1242 */
1243object * 1243object *
1244insert_ob_in_map_at (object *op, maptile *m, object *originator, int flag, int x, int y) 1244insert_ob_in_map_at (object *op, maptile *m, object *originator, int flag, int x, int y)
1245{ 1245{
1246 op->remove ();
1247
1246 for (object *tmp = op->head_ (); tmp; tmp = tmp->more) 1248 for (object *tmp = op->head_ (); tmp; tmp = tmp->more)
1247 { 1249 {
1248 tmp->x = x + tmp->arch->x; 1250 tmp->x = x + tmp->arch->x;
1249 tmp->y = y + tmp->arch->y; 1251 tmp->y = y + tmp->arch->y;
1250 } 1252 }
1273 * just 'op' otherwise 1275 * just 'op' otherwise
1274 */ 1276 */
1275object * 1277object *
1276insert_ob_in_map (object *op, maptile *m, object *originator, int flag) 1278insert_ob_in_map (object *op, maptile *m, object *originator, int flag)
1277{ 1279{
1280 if (op->is_on_map ())
1281 {
1282 LOG (llevError, "insert_ob_in_map called for object already on map");
1283 abort ();
1284 }
1285
1286 if (op->env)
1287 {
1288 LOG (llevError, "insert_ob_in_map called for object in an inventory (proceeding)");
1278 op->remove (); 1289 op->remove ();
1290 }
1279 1291
1280 /* Ideally, the caller figures this out. However, it complicates a lot 1292 /* Ideally, the caller figures this out. However, it complicates a lot
1281 * of areas of callers (eg, anything that uses find_free_spot would now 1293 * of areas of callers (eg, anything that uses find_free_spot would now
1282 * need extra work 1294 * need extra work
1283 */ 1295 */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines