OpenTTD

Tasklist

FS#4118 - Buildings stays under costruction forever

Attached to Project: OpenTTD
Opened by Antti Silventoinen (as) - Saturday, 11 September 2010, 15:52 GMT
Last edited by frosch (frosch) - Sunday, 12 September 2010, 18:32 GMT
Type Bug
Category NewGRF
Status Closed
Assigned To No-one
Operating System All
Severity Medium
Priority Normal
Reported Version trunk
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

In attached savegame some houses stay under construction for ever. Newgrf debug tools shows that the age of the buggy building stays at 0 years even after several game years have passed. The issue seems to be somehow related to animation, as all affected buildings use animation callbacks.

Tested with r20782, in 1.0.4-RC1 houses work normally.


This task depends upon

Closed by  frosch (frosch)
Sunday, 12 September 2010, 18:32 GMT
Reason for closing:  Fixed
Additional comments about closing:  in r20790
Comment by Antti Silventoinen (as) - Saturday, 11 September 2010, 16:01 GMT
The savegame needs "swedish houses 1.1" grf which is available at online content.
Comment by Hirundo (Hirundo) - Saturday, 11 September 2010, 17:59 GMT
The age of a building remains at 0 while the building is under construction. Does your animation callback expect otherwise?
Comment by frosch (frosch) - Sunday, 12 September 2010, 15:56 GMT
MakeSingleHouseBigger() bails out at:
/* means it is completed, get out. */
if (LiftHasDestination(tile)) return;

Remains the question what that check is meant for :p
Comment by Antti Silventoinen (as) - Sunday, 12 September 2010, 18:02 GMT
It seems that after r20621 both animation frames for newhouses and status of lift for original ttd buildings 04 and 05 are saved in same location in m7.

The change below fixes the issue, but I don't know much about c++ coding so I don't know if it is the correct way to do it.

- if (LiftHasDestination(tile)) return;
+ if (!(GetHouseType(tile) >= NEW_HOUSE_OFFSET))
+ if (LiftHasDestination(tile)) return;

Loading...