version 1.40 | | version 1.41 |
---|
| | |
/* | | /* |
* static char *rcsid_pets_c = | | * static char *rcsid_pets_c = |
* "$Id: pets.c,v 1.40 2005/12/10 14:27:10 akirschbaum Exp $"; | | * "$Id: pets.c,v 1.41 2006/01/07 18:13:50 akirschbaum Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
for(obl = first_friendly_object; obl != NULL; obl = next) { | | for(obl = first_friendly_object; obl != NULL; obl = next) { |
next = obl->next; | | next = obl->next; |
if(obl->ob->type != PLAYER && QUERY_FLAG(obl->ob,FLAG_FRIENDLY) && | | if(obl->ob->type != PLAYER && QUERY_FLAG(obl->ob,FLAG_FRIENDLY) && |
(owner = get_owner(obl->ob)) != NULL && owner->map != obl->ob->map) | | (owner = get_owner(obl->ob)) != NULL && !on_same_map(owner, obl->ob)) |
{ | | { |
/* follow owner checks map status for us */ | | /* follow owner checks map status for us */ |
follow_owner(obl->ob,owner); | | follow_owner(obl->ob,owner); |
| | |
} | | } |
| | |
/* move monster into the owners map if not in the same map */ | | /* move monster into the owners map if not in the same map */ |
if (ob->map != owner->map) { | | if (!on_same_map(ob, owner)) { |
follow_owner(ob, owner); | | follow_owner(ob, owner); |
return; | | return; |
} | | } |