Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#1762 closed defect (fixed)

[PATCH] Rally points not drawn after loading game

Reported by: zoot Owned by: sanderd17
Priority: Should Have Milestone: Alpha 15
Component: Core engine Keywords: patch
Cc: Patch:

Description

While rally points are properly stored in and loaded from savegames, they are not drawn on the screen when selecting the building after loading the savegame.

Attachments (2)

rallyPointRenderer.diff (6.5 KB ) - added by mimo 11 years ago.
rallyPointRenderer-2.diff (7.2 KB ) - added by mimo 11 years ago.

Download all attachments as: .zip

Change History (9)

by mimo, 11 years ago

Attachment: rallyPointRenderer.diff added

comment:1 by mimo, 11 years ago

This bug is fixed in the attached patch. The problem was due to the RallyPointRenderer which is not initialized in case of saved games. There may be several ways to do it: I've used a InitSavedGame function (called at the same place as the InitGame function for new games). Let me know if there is a better place to do it.

In addition, while testing, I noticed that there is another problem with the rallyPointRenderer: when a rallyPoint is unset, its renderer is not cleared, so when setting a new rallyPoint with the shift-key, the renderer adds this point to the previous ones (although the rallyPoint itself was correct). This is also fixed in the patch.

comment:2 by mimo, 11 years ago

Keywords: patch review added
Milestone: BacklogAlpha 15
Summary: Rally points not drawn after loading game[PATCH] Rally points not drawn after loading game

comment:3 by sanderd17, 11 years ago

Owner: set to sanderd17
Resolution: fixed
Status: newclosed

In 13897:

Fix rally point rendering on saved games. Fixes #1762. Patch by mimo

comment:4 by mimo, 11 years ago

There was some discussions yesterday on IRC, with people not in favor of this new initSavedGame. Here is a patch which removes it, and rebuilds the renderer when needed in GuiInterface.js.

With this change, the filling of the renderer in Foundation.js when a foundation updates to a building is no more necessary. I've thus suppressed it. But this change in Foundation.js does not interfere with the rest of the patch and can be removed.

by mimo, 11 years ago

Attachment: rallyPointRenderer-2.diff added

comment:5 by sanderd17, 11 years ago

Resolution: fixed
Status: closedreopened

Will look at it

comment:6 by sanderd17, 11 years ago

Resolution: fixed
Status: reopenedclosed

In 14010:

Remove InitSavedGame, but keep the rallypoint problem it solved. Fixes #1762, Patch by mimo.

comment:7 by sanderd17, 11 years ago

Keywords: review removed
Note: See TracTickets for help on using tickets.