forked from github/server
Fix to the fix for ship-damage
This commit is contained in:
parent
d72c0ab07e
commit
dabb8ae3c2
|
@ -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+DAMAGE_SCALE-1)*100/(sh->size*DAMAGE_SCALE);
|
||||
int percent = (sh->damage*100+DAMAGE_SCALE-1)/(sh->size*DAMAGE_SCALE);
|
||||
fprintf(F, "%d;Schaden\n", percent);
|
||||
}
|
||||
if (u)
|
||||
|
|
|
@ -2105,7 +2105,7 @@ report_plaintext(const char * filename, report_context * ctx)
|
|||
sh->type->construction->maxsize);
|
||||
}
|
||||
if (sh->damage) {
|
||||
int percent = (sh->damage+DAMAGE_SCALE-1)*100/(sh->size*DAMAGE_SCALE);
|
||||
int percent = (sh->damage*100+DAMAGE_SCALE-1)/(sh->size*DAMAGE_SCALE);
|
||||
sprintf(buf+strlen(buf), ", %d%% %s", percent, LOC(f->locale, "nr_damaged"));
|
||||
}
|
||||
if (!fval(r->terrain, SEA_REGION)) {
|
||||
|
|
Loading…
Reference in New Issue