News:

Simutrans.com Portal
Our Simutrans site. You can find everything about Simutrans from here.

[patch] z-offsets for trees

Started by Milko, May 01, 2010, 10:41:47 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Milko

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

Dwachs

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.
Parsley, sage, rosemary, and maggikraut.

Dwachs

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.
Parsley, sage, rosemary, and maggikraut.

prissi

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.

Dwachs

This patch is getting old. What about including it NOW? Just before the speedbonus-112-release?

Updated patch attached.
Parsley, sage, rosemary, and maggikraut.

prissi

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.

Dwachs

No problems with trees after year 2730  :)

Incorporated in r 4954
Parsley, sage, rosemary, and maggikraut.

Dwachs

--merged with the associated patch thread
Parsley, sage, rosemary, and maggikraut.

prissi

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.