The International Simutrans Forum

Development => Patches & Projects => Incorporated Patches and Solved Bug Reports => Topic started by: Milko on May 01, 2010, 10:41:47 AM

Title: [patch] z-offsets for trees
Post by: Milko on May 01, 2010, 10:41:47 AM
Hi

In may game I have trees on the way... The road is public, built on the start of the game, I do not know when the trees have appeared.

Pak 128 Nightly 808 - Simutrans 102.2.2 (last stable)

Giuseppe
Title: Re: Trees on the way
Post by: Dwachs on May 01, 2010, 01:16:53 PM
Nature conquers back! It is a known bug. Internally these trees are not on the road tiles but on neighboring tiles, and the graphics have a wrong offset.
Title: [patch] z-offsets for trees
Post by: Dwachs on September 04, 2010, 03:30:21 PM
This patch introduces z-offsets for trees. This allows a more precise positioning of trees on tiles. After rotation trees are resorted on the tile to avoid strange overlapping of images.

Reminder: The simutrans code assumes that the graphics of the trees in the pak-files are centered on the tile.
Title: Re: [patch] z-offsets for trees
Post by: prissi on September 04, 2010, 07:21:50 PM
Maybe we should wait with this until the next version is released, as it an esthetical problem. The solution seems ok, and it will just increase savegame size.
Title: Re: [patch] z-offsets for trees
Post by: Dwachs on November 20, 2011, 06:59:31 PM
This patch is getting old. What about including it NOW? Just before the speedbonus-112-release?

Updated patch attached.
Title: Re: [patch] z-offsets for trees
Post by: prissi on November 20, 2011, 09:25:06 PM
The means no trees beyond 2730. Not many but a few player will be affected by this. Maybe using unit32 for age, which will give us until 5461, which should be safe even for advanced future packs.

But you are right, before stepping savegame, lets include this too.
Title: Re: [patch] z-offsets for trees
Post by: Dwachs on November 21, 2011, 09:41:40 PM
No problems with trees after year 2730  :)

Incorporated in r 4954
Title: Re: Trees on the way
Post by: Dwachs on November 21, 2011, 09:43:56 PM
--merged with the associated patch thread
Title: Re: [patch] z-offsets for trees
Post by: prissi on November 24, 2011, 03:37:40 PM
What is the portpose of sorttree? During loading the trees are already inserted using add(), which ensures correct order.

EDIT: Sorry, now I see. The order would only fit after a reloading or rotation of an old game.