--- deliantra/server/common/object.C 2009/11/29 09:41:27 1.306 +++ deliantra/server/common/object.C 2009/12/17 01:04:37 1.310 @@ -79,7 +79,7 @@ } static void -read_uuid (void) +read_uuid () { char filename[MAX_BUF]; @@ -250,12 +250,12 @@ */ bool object::can_merge_slow (object *ob1, object *ob2) { - /* A couple quicksanity checks */ + /* A couple quick sanity checks */ if (ob1 == ob2 || ob1->type != ob2->type - || fabs (ob1->speed - ob2->speed) >= MIN_ACTIVE_SPEED || ob1->value != ob2->value - || ob1->name != ob2->name) + || ob1->name != ob2->name + || fabs (ob1->speed - ob2->speed) >= MIN_ACTIVE_SPEED) return 0; /* Do not merge objects if nrof would overflow, assume nrof @@ -286,7 +286,7 @@ || ob1->skill != ob2->skill || ob1->value != ob2->value || ob1->animation_id != ob2->animation_id - || (ob1->face != ob2->face && !ob1->animation_id) // face and animation are dependent on each other + || (ob1->face != ob2->face && !ob1->animation_id) // face and animation are dependend on each other || ob1->client_type != ob2->client_type || ob1->material != ob2->material || ob1->lore != ob2->lore @@ -700,9 +700,9 @@ // TODO: unclean state changes, should nt be done in copy_to AND instantiate if (flag [FLAG_RANDOM_SPEED] && speed) - speed_left = -rndm (); // TODO animation + speed_left = - speed - rndm (); // TODO animation else - speed_left = -speed; + speed_left = -1.; /* copy the body_info to the body_used - this is only really * need for monsters, but doesn't hurt to do it for everything. @@ -724,7 +724,7 @@ // TODO: unclean state changes, should not be done in clone AND instantiate if (neu->flag [FLAG_RANDOM_SPEED] && neu->speed) - neu->speed_left = -rndm (); // TODO animation + neu->speed_left = - neu->speed - rndm (); // TODO animation neu->map = map; // not copied by copy_to return neu; @@ -1271,7 +1271,7 @@ for (archetype *at = (archetype *)arch->more; at; at = (archetype *)at->more) { - object *op = arch_to_object (at); + object *op = at->instance (); op->name = name; op->name_pl = name_pl; @@ -1556,7 +1556,7 @@ if (tmp->arch->archname == archname) /* same archetype */ tmp->destroy (); - object *tmp = arch_to_object (archetype::find (archname)); + object *tmp = archetype::find (archname)->instance (); tmp->x = op->x; tmp->y = op->y; @@ -2565,7 +2565,7 @@ // insert the "Close Container" object. if (archetype *closer = new_container->other_arch) { - object *closer = arch_to_object (new_container->other_arch); + object *closer = new_container->other_arch->instance (); closer->flag [FLAG_NO_MAP_SAVE] = 1; new_container->insert (closer); }