version 1.4 | | version 1.5 |
---|
| | |
/* | | /* |
* static char *rcsid_pets_c = | | * static char *rcsid_pets_c = |
* "$Id: pets.c,v 1.4 2000/05/27 06:02:58 cvs Exp $"; | | * "$Id: pets.c,v 1.5 2001/01/31 07:54:52 cvs Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
* process of entering a new map when this is called. | | * process of entering a new map when this is called. |
* Thus the map isn't loaded yet, and we have to remove | | * Thus the map isn't loaded yet, and we have to remove |
* the pet... | | * the pet... |
| | * Interesting enough, we don't use the passed map structure in |
| | * this function. |
*/ | | */ |
| | |
void remove_all_pets(mapstruct *map) { | | void remove_all_pets(mapstruct *map) { |
| | |
return; | | return; |
} | | } |
dir = find_free_spot(ob->arch, owner->map, | | dir = find_free_spot(ob->arch, owner->map, |
owner->x, owner->y, 1, SIZEOFFREE); | | owner->x, owner->y, 1, SIZEOFFREE+1); |
if (dir==-1) { | | if (dir==-1) { |
LOG(llevMonster,"No space for pet to follow, freeing %s.\n",ob->name); | | LOG(llevMonster,"No space for pet to follow, freeing %s.\n",ob->name); |
return; /* Will be freed since it's removed */ | | return; /* Will be freed since it's removed */ |
| | |
} | | } |
insert_ob_in_map(ob, owner->map, NULL); | | insert_ob_in_map(ob, owner->map, NULL); |
if (owner->type == PLAYER) /* Uh, I hope this is always true... */ | | if (owner->type == PLAYER) /* Uh, I hope this is always true... */ |
new_draw_info(NDI_UNIQUE, 0,ob->owner, "Your pet magically appears next to you"); | | new_draw_info(NDI_UNIQUE, 0,owner, "Your pet magically appears next to you"); |
return; | | return; |
} | | } |
| | |