Verfuegbare Beladung auf Schiffen fehlerhaft
This commit is contained in:
Enno Rehling 2006-05-07 21:54:53 +00:00
parent 10b1306b30
commit d47957487a
2 changed files with 3 additions and 4 deletions

View File

@ -570,7 +570,7 @@ cr_output_ship(FILE * F, const ship * sh, const unit * u, int fcaptain, const fa
fprintf(F, "\"%s\";Typ\n", add_translation(sh->type->name[0], locale_string(f->locale, sh->type->name[0])));
fprintf(F, "%d;Groesse\n", sh->size);
if (sh->damage) {
int percent = sh->damage*100/(sh->size*DAMAGE_SCALE);
int percent = (sh->damage+DAMAGE_SCALE-1)*100/(sh->size*DAMAGE_SCALE);
fprintf(F, "%d;Schaden\n", percent);
}
if (u)

View File

@ -2105,9 +2105,8 @@ report_plaintext(const char * filename, report_context * ctx)
sh->type->construction->maxsize);
}
if (sh->damage) {
sprintf(buf+strlen(buf), ", %d%% %s",
sh->damage*100/(sh->size*DAMAGE_SCALE),
LOC(f->locale, "nr_damaged"));
int percent = (sh->damage+DAMAGE_SCALE-1)*100/(sh->size*DAMAGE_SCALE);
sprintf(buf+strlen(buf), ", %d%% %s", percent, LOC(f->locale, "nr_damaged"));
}
if (!fval(r->terrain, SEA_REGION)) {
if (sh->coast != NODIRECTION) {