version 1.52 | | version 1.53 |
---|
| | |
/* | | /* |
* static char *rcsid_object_c = | | * static char *rcsid_object_c = |
* "$Id: object.c,v 1.52 2002/01/14 06:03:31 mwedel Exp $"; | | * "$Id: object.c,v 1.53 2002/03/11 22:02:37 avogl Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
void update_object(object *op, int action) { | | void update_object(object *op, int action) { |
int update_now, flags; | | int update_now, flags; |
| | |
| | if (op == NULL) { |
| | /* this should never happen */ |
| | LOG(llevDebug,"update_object() called for NULL object.\n"); |
| | return; |
| | } |
| | |
if(op->env!=NULL) { | | if(op->env!=NULL) { |
/* Animation is currently handled by client, so nothing | | /* Animation is currently handled by client, so nothing |
* to do in this case. | | * to do in this case. |
| | |
*/ | | */ |
if (!op->map || op->map->in_memory == MAP_SAVING) return; | | if (!op->map || op->map->in_memory == MAP_SAVING) return; |
| | |
| | /* make sure the object is within map boundaries */ |
| | if (op->x < 0 || op->x >= MAP_WIDTH(op->map) || |
| | op->y < 0 || op->y >= MAP_HEIGHT(op->map)) { |
| | LOG(llevError,"update_object() called for object out of map!\n"); |
| | return; |
| | } |
| | |
flags = GET_MAP_FLAGS(op->map, op->x, op->y); | | flags = GET_MAP_FLAGS(op->map, op->x, op->y); |
SET_MAP_FLAGS(op->map, op->x, op->y, flags | P_NEED_UPDATE); | | SET_MAP_FLAGS(op->map, op->x, op->y, flags | P_NEED_UPDATE); |
| | |