version 1.8 | | version 1.9 |
---|
| | |
/* | | /* |
* static char *rcsid_c_misc_c = | | * static char *rcsid_c_misc_c = |
* "$Id: c_misc.c,v 1.8 2001/01/16 22:19:33 pjka Exp $"; | | * "$Id: c_misc.c,v 1.9 2001/02/23 06:06:35 mwedel Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
new_draw_info_format(NDI_UNIQUE, 0, op, | | new_draw_info_format(NDI_UNIQUE, 0, op, |
"Current time is: %02ld:%02ld:%02ld.", | | "Current time is: %02ld:%02ld:%02ld.", |
(sec%86400)/3600,(sec%3600)/60,sec%60); | | (sec%86400)/3600,(sec%3600)/60,sec%60); |
new_draw_info(NDI_UNIQUE, 0,op,"Path Pl PlM IM TO Dif Pen Reset"); | | new_draw_info(NDI_UNIQUE, 0,op,"Path Pl PlM IM TO Dif Reset"); |
#else | | #else |
new_draw_info(NDI_UNIQUE, 0,op,"Pl Pl-M IM TO Dif Pen"); | | new_draw_info(NDI_UNIQUE, 0,op,"Pl Pl-M IM TO Dif"); |
#endif | | #endif |
for(m=first_map;m!=NULL;m=m->next) { | | for(m=first_map;m!=NULL;m=m->next) { |
#ifndef MAP_RESET | | #ifndef MAP_RESET |
| | |
if (strlen(m->path)<=18) strcpy(map_path, m->path); | | if (strlen(m->path)<=18) strcpy(map_path, m->path); |
else strcpy(map_path, m->path + strlen(m->path) - 18); | | else strcpy(map_path, m->path + strlen(m->path) - 18); |
#ifndef MAP_RESET | | #ifndef MAP_RESET |
sprintf(buf,"%-18.18s %2ld %2d %1ld %4ld %2ld %2d", | | sprintf(buf,"%-18.18s %2ld %2d %1ld %4ld %2ld", |
map_path, m->players,players_on_map(m),m->in_memory,m->timeout, | | map_path, m->players,players_on_map(m),m->in_memory,m->timeout, |
m->difficulty, count_pending(m)); | | m->difficulty); |
#else | | #else |
sprintf(buf,"%-18.18s %2d %2d %1d %4d %2d %2d %02ld:%02ld:%02ld", | | sprintf(buf,"%-18.18s %2d %2d %1d %4d %2d %02ld:%02ld:%02ld", |
map_path, m->players,players_on_map(m), | | map_path, m->players,players_on_map(m), |
m->in_memory,m->timeout,m->difficulty, count_pending(m), | | m->in_memory,m->timeout,m->difficulty, |
(m->reset_time%86400)/3600,(m->reset_time%3600)/60, | | (m->reset_time%86400)/3600,(m->reset_time%3600)/60, |
m->reset_time%60); | | m->reset_time%60); |
#endif | | #endif |
| | |
new_draw_info(NDI_UNIQUE, 0,op,errmsg); | | new_draw_info(NDI_UNIQUE, 0,op,errmsg); |
} | | } |
| | |
int count_pending(mapstruct *map) { | | |
objectlink *obl; | | |
int i; | | |
| | |
for(i=0, obl = map->pending; obl != NULL; obl = obl->next) | | |
i++; | | |
return i; | | |
} | | |
| | |
void current_map_info(object *op) { | | void current_map_info(object *op) { |
mapstruct *m = op->map; | | mapstruct *m = op->map; |