#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)
Change History (9)
by , 11 years ago
Attachment: | rallyPointRenderer.diff added |
---|
comment:1 by , 11 years ago
comment:2 by , 11 years ago
Keywords: | patch review added |
---|---|
Milestone: | Backlog → Alpha 15 |
Summary: | Rally points not drawn after loading game → [PATCH] Rally points not drawn after loading game |
comment:4 by , 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 , 11 years ago
Attachment: | rallyPointRenderer-2.diff added |
---|
comment:7 by , 11 years ago
Keywords: | review removed |
---|
Note:
See TracTickets
for help on using tickets.
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.