version 1.33 | | version 1.34 |
---|
| | |
/* | | /* |
* static char *rcsid_main_c = | | * static char *rcsid_main_c = |
* "$Id: main.c,v 1.33 2001/03/21 05:11:03 mwedel Exp $"; | | * "$Id: main.c,v 1.34 2001/03/21 07:48:12 mwedel Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
#endif | | #endif |
/* Update any golems */ | | /* Update any golems */ |
if(op->type == PLAYER && op->contr->golem != NULL) { | | if(op->type == PLAYER && op->contr->golem != NULL) { |
int i = find_free_spot(op->arch,newmap, x, y, 1, SIZEOFFREE+1); | | int i = find_free_spot(op->contr->golem->arch,newmap, x, y, 1, SIZEOFFREE+1); |
| | |
remove_ob(op->contr->golem); | | remove_ob(op->contr->golem); |
if (i==-1) { | | if (i==-1) { |
| | |
op->contr->golem=NULL; | | op->contr->golem=NULL; |
} | | } |
else { | | else { |
op->contr->golem->map = newmap; | | object *tmp; |
op->contr->golem->x = x + freearr_x[i]; | | for (tmp=op->contr->golem; tmp!=NULL; tmp=tmp->more) { |
op->contr->golem->y = y + freearr_y[i]; | | tmp->x = x + freearr_x[i]+ (tmp->arch==NULL?0:tmp->arch->clone.x); |
| | tmp->y = y + freearr_y[i]+ (tmp->arch==NULL?0:tmp->arch->clone.y); |
| | tmp->map = newmap; |
| | } |
insert_ob_in_map(op->contr->golem, newmap, NULL); | | insert_ob_in_map(op->contr->golem, newmap, NULL); |
op->contr->golem->direction = find_dir_2(op->x - op->contr->golem->x, op->y - op->contr->golem->y); | | op->contr->golem->direction = find_dir_2(op->x - op->contr->golem->x, op->y - op->contr->golem->y); |
} | | } |