UFO: Alien Invasion Issue Tracker
UFO: Alien Invasion
Go to the previous open issue
Go to the previous issue (open or closed)
star_faded.png
Please log in to bookmark issues
icon_project.png UFO: Alien Invasion / Closed Bug report #2769 Productiontime is reset after a savegame is loaded
Go to the next issue (open or closed)
Go to the next open issue
This issue has been closed with status "Closed" and resolution "Not determined".
Issue basics
  • Type of issue
    Bug report
  • Category
    Engine
  • Targetted for
    Not determined
  • Status
    Closed
  • Priority
    5. Important
User pain
  • Type of bug
    Not triaged
  • Likelihood
    Not triaged
  • Effect
    Not triaged
Affected by this issue (1)
People involved
Times and dates
  • Posted at
  • Last updated
  • Estimated time
    Not estimated
Issue details
  • Resolution
    Not determined
  • Reproducability
    Not determined
  • Severity
    Not determined
  • Complexity
    Not determined
  • Platform
    Not determined
  • Architecture
    Not determined
Attachments (0)
There is nothing attached to this issue
Duplicate issues (0)
This issue does not have any duplicates
Description
[http://sourceforge.net/p/ufoai/bugs/2769 Item 2769] imported from sourceforge.net tracker on 2013-01-28 19:47:16

Productiontime is reset everytime a savegame is loaded and the gametime advances.

I think the bug was introduced with Commit:bb4707645ecdf38334df669b0e44716112646bb3 * fixed production time calculations and PR_ProductionRollBottom_f was called with a wrong base

In cp_produce.c:

The function PR_LoadXML sets the value prod->percentDone but does not change prod->frame.
But the function PR_ProductionRun increments prod->frame and calculates prod->percentDone from prod->frame
So after a game is loaded the last productiontime i displayed (from prod->percentDone) but if gametime advances productiontime is reset.

===== Comments Ported from Sourceforge =====

====== geever (2011-01-06 23:42:39) ======

mattn introduced this prod->frame stuff but did not ensure it is saved/loaded.
I decided saving prod->frame and calculate precentDone on loading.

The savegame format changed but no break. The game can load them just productions reseted once more.

Thanks for reporting!
-geever

====== geever (2011-01-07 00:05:04) ======

Ok, I reopen this. The major issue is fixed but found a little cosmetic bug.

On Save->Load the remaining hours value on production page is MAX+1, when you start the time it's fixed.
The issue happens because on load time base capacities are not fully set up, it's done in a second round.

-geever
====== geever (2011-01-07 22:43:08) ======

Fixed the last issue too (see previous coment), closing.

-geever
====== sf-robot (2011-01-21 23:20:03) ======

This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).
Steps to reproduce this issue
Nothing entered.
Todos (0 / 0)
Issue created
footer_logo.png The Bug Genie 4.3.1 | Support | Feedback spinning_16.gif