version 1.2 | | version 1.3 |
---|
| | |
/* | | /* |
* static char *rcsid_server_c = | | * static char *rcsid_server_c = |
* "$Id: server.c,v 1.2 2006/06/05 06:28:56 mwedel Exp $"; | | * "$Id: server.c,v 1.3 2006/07/25 18:04:10 gros Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
marker.active_prev = NULL; | | marker.active_prev = NULL; |
active_objects = ▮ | | active_objects = ▮ |
| | |
while (marker.active_next) { | | while (marker.active_next) |
| | { |
op = marker.active_next; | | op = marker.active_next; |
tag = op->count; | | tag = op->count; |
| | |
| | |
op->active_next = ▮ | | op->active_next = ▮ |
| | |
/* Now process op */ | | /* Now process op */ |
if (QUERY_FLAG (op, FLAG_FREED)) { | | if (QUERY_FLAG (op, FLAG_FREED)) |
| | { |
LOG (llevError, "BUG: process_events(): Free object on list\n"); | | LOG (llevError, "BUG: process_events(): Free object on list\n"); |
op->speed = 0; | | op->speed = 0; |
update_ob_speed (op); | | update_ob_speed (op); |
| | |
* around. | | * around. |
*/ | | */ |
if (QUERY_FLAG (op, FLAG_REMOVED) && op->type != PLAYER && | | if (QUERY_FLAG (op, FLAG_REMOVED) && op->type != PLAYER && |
op->map && op->map->in_memory != MAP_IN_MEMORY) { | | op->map && op->map->in_memory != MAP_IN_MEMORY) |
| | { |
LOG (llevError, "BUG: process_events(): Removed object on list\n"); | | LOG (llevError, "BUG: process_events(): Removed object on list\n"); |
dump_object(op); | | dump_object(op); |
LOG(llevError, errmsg); | | LOG(llevError, errmsg); |
| | |
continue; | | continue; |
} | | } |
| | |
if ( ! op->speed) { | | if ( ! op->speed) |
| | { |
LOG (llevError, "BUG: process_events(): Object %s has no speed, " | | LOG (llevError, "BUG: process_events(): Object %s has no speed, " |
"but is on active list\n", op->arch->name); | | "but is on active list\n", op->arch->name); |
update_ob_speed (op); | | update_ob_speed (op); |
| | |
} | | } |
| | |
if (op->map == NULL && op->env == NULL && op->name && | | if (op->map == NULL && op->env == NULL && op->name && |
op->type != MAP && map == NULL) { | | op->type != MAP && map == NULL) |
| | { |
LOG (llevError, "BUG: process_events(): Object without map or " | | LOG (llevError, "BUG: process_events(): Object without map or " |
"inventory is on active list: %s (%d)\n", | | "inventory is on active list: %s (%d)\n", op->name, op->count); |
op->name, op->count); | | |
op->speed = 0; | | op->speed = 0; |
update_ob_speed (op); | | update_ob_speed (op); |
continue; | | continue; |
| | |
/* Animate the object. Bug of feature that andim_speed | | /* Animate the object. Bug of feature that andim_speed |
* is based on ticks, and not the creatures speed? | | * is based on ticks, and not the creatures speed? |
*/ | | */ |
if (op->anim_speed && op->last_anim >= op->anim_speed) { | | if (op->anim_speed && op->last_anim >= op->anim_speed) |
| | { |
| | if ((op->type==PLAYER)||(op->type==MONSTER)) |
| | animate_object(op, op->facing); |
| | else |
animate_object (op, op->direction); | | animate_object (op, op->direction); |
op->last_anim = 1; | | op->last_anim = 1; |
} else { | | } |
| | else |
| | { |
op->last_anim++; | | op->last_anim++; |
} | | } |
| | |
if (op->speed_left > 0) { | | if (op->speed_left > 0) |
| | { |
#if 0 | | #if 0 |
/* I've seen occasional crashes in move_symptom() with it | | /* I've seen occasional crashes in move_symptom() with it |
* crashing because op is removed - add some debugging to | | * crashing because op is removed - add some debugging to |