News:

Simutrans Wiki Manual
The official on-line manual for Simutrans. Read and contribute.

r2005 - Buttons on station detail window need long time to work

Started by z9999, September 07, 2008, 10:55:59 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

z9999

(splited topic from http://forum.simutrans.com/index.php?topic=334.msg2470#msg2470 )


What I did.
1. Load a saved game
2. Open station detail window
3. Click one of jump button

In this case, button image didn't change to pressed image and nothing happened.
But it started working after 20 seconds.

Same thing happened when I rotated the map.

What I did.
1. Open station detail window
2. Rotate map
3. Click one of jump button

During first 15 seconds
- button image change to pressed image, but jump to old coordinate
During next 30 seconds
- button image don't change to pressed image, and don't jump

After 45 seconds, jump button start working again to new coordinate



Redrawing this window is called when flag "halt-is_rerouting()" is true.
But this flag is useless for redrawing.
This flag means:
"rebuild_destinations" or "reroute_goods" is demanded, but still waiting its order.

If "rebuild_destinations" and "reroute_goods" were done, flag "halt-is_rerouting()" will return false. Then it don't redraw new state.

So, redrawing happens during waiting its order, again and again. During that time, we can't click button.

And in some cases, rotating or reroute_goods, we don't need to wait halt status update, imho.

prissi

The station does not immeadiately know its new destination. It is done in a two step process. First, the destination is updated. Then, several steps later, the goods are rerouted. This can easily take again up to 60s. (It must be spread like this, otherwise there can be long delays on big maps. This was one of the reasons older version often froze at the beginning of a new month.)

But only a single redraw is needed. I will think of a better way to enforce it.

EDIT: done