waiting_acceptance variable, new trains loading&unloadin

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

Post Reply
JCU
Engineer
Engineer
Posts: 4
Joined: 20 Oct 2004 12:54
Location: Russia, Moscow

waiting_acceptance variable, new trains loading&unloadin

Post by JCU »

Max. cargo count waiting on a station is limited by 0xFFF that means 4095. For any large station that transfers a large amount of cargo, this limitation is very annoying.

But as I see, there are 3 more free bits: only the last one is occupied by the acceptance flag. After changing all needed masks, I recently tested this possibility. With a new game this works fine, new limit is 32767 and is not so low. But the old savegame crushes after applying this change. Crush appears when i click on a station.

Why the game crushes? Are there any related variables, flags and so on? Or this is my own bug? But corrected version is stable after a new game was started, even when I have more than 4096 units of cargo on a station.

Also i just made the new ttdpatch-like trains loading/unloading patch that may be enabled from "configure patches" window. Is it possible to insert this one into the "official" sourcecode?

P.S. Sorry for my not-so-good english.
User avatar
bociusz
Traffic Manager
Traffic Manager
Posts: 131
Joined: 24 Jul 2004 11:04
Location: Hungary
Contact:

Re: waiting_acceptance variable, new trains loading&unlo

Post by bociusz »

JCU wrote:Max. cargo count waiting on a station is limited by 0xFFF that means 4095. For any large station that transfers a large amount of cargo, this limitation is very annoying.

But as I see, there are 3 more free bits: only the last one is occupied by the acceptance flag. After changing all needed masks, I recently tested this possibility. With a new game this works fine, new limit is 32767 and is not so low. But the old savegame crushes after applying this change. Crush appears when i click on a station.

Why the game crushes? Are there any related variables, flags and so on? Or this is my own bug? But corrected version is stable after a new game was started, even when I have more than 4096 units of cargo on a station.

Also i just made the new ttdpatch-like trains loading/unloading patch that may be enabled from "configure patches" window. Is it possible to insert this one into the "official" sourcecode?

P.S. Sorry for my not-so-good english.
Post the diff file here, I'm interested in that features.
JCU
Engineer
Engineer
Posts: 4
Joined: 20 Oct 2004 12:54
Location: Russia, Moscow

My changes. And also 2 bug reports.

Post by JCU »

I have no program to automatically extract all my changes.

I just finished manual extraction, and it should work. Possibly with bugs... Let me know if you find these small annoying creatures in my code.

In general, all my changes (exceps 0xFFF limitation removing) marked by my nickname-related variables and function names.

Also, 2 bug reports:

1. when I am click on the flag mark in the left of a train depot window and window is scrolled, flag's state remains the same.

2. when I have a station with 2 trains loading simultaniously and then they are arriving, second one, receiving red lite (one-sided) on the outgoing track, will try to reverse after some seconds, and locks incoming rails for a few seconds. In original TTD delay before reversing in such a case is much, much greater.
Attachments
jcu_changes.txt
code changes for openttd-0.3.4
some new features and possibly new bugs.
(19.92 KiB) Downloaded 330 times
JCU
Engineer
Engineer
Posts: 4
Joined: 20 Oct 2004 12:54
Location: Russia, Moscow

Some new updates for my changes

Post by JCU »

One more setting (station rating setup for large transport terminals with hude amounts of cargo).

Increased feeders limit (my option update)

Industries will not close (not tested but should work) when their percetnage of transported goods is greater then ~62% - with jcu_industry_production mode only
Attachments
jcu_changes2.txt
update for my changes
(2.75 KiB) Downloaded 314 times
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 10 guests