[Fix] Bug that converted a 100% chance mission to 0%..

This commit is contained in:
Allanis 2013-08-26 15:40:28 +01:00
parent 569c77ab80
commit a9780b6c4d
3 changed files with 3 additions and 3 deletions

View File

@ -21,7 +21,7 @@ end
function create()
-- Intro text.
if tk.yesno(title[1], text[1], player.name()) then
if tk.yesno(title[1], text[1]) then
misn.accept()
misn_stage = 0

View File

@ -201,7 +201,7 @@ int hook_save(xmlTextWriterPtr writer) {
xmlw_startElem(writer, "hook");
/*xmlw_attr(writer, "id", "%u", h->id); /* I don't think it's needed. */
/*xmlw_attr(writer, "id", "%u", h->id);*/ /* I don't think it's needed. */
xmlw_elem(writer, "parent", "%u", h->parent);
xmlw_elem(writer, "func", "%s", h->func);
xmlw_elem(writer, "stack", "%s", h->stack);

View File

@ -243,7 +243,7 @@ void missions_bar(int faction, char* planet, char* sysname) {
if(!mission_meetReq(i, faction, planet, sysname))
continue;
chance = (double)(misn->avail.chance % 100)/100.;
chance = (double)(misn->avail.chance % 101)/100.;
if(RNGF() < chance) {
mission_init(&mission, misn, 0);