Revival of subsidiaries patch

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

T-Unit
Transport Coordinator
Transport Coordinator
Posts: 368
Joined: 03 Feb 2007 18:53
Location: Leeds, England

Re: Revival of subsidiaries patch

Post by T-Unit »

That is a problem that i have been trying to solve since i posted the idea and i can see many ways around it so i have decided it isnt one of my better ideas.
gagarin
Engineer
Engineer
Posts: 57
Joined: 26 Feb 2006 18:52
Location: Berlin, Germany

Re: Revival of subsidiaries patch

Post by gagarin »

Well, loading previously saved games works, thank you.
But I have found another bug. As soon as I build docks, it is destroyed in a few seconds, automatically.... -> It appears also in a game where your original patch file is applied, without later modifications to load previously saved games..... -> railway stations, airports, bus stops and truck loading areas are OK....

Docks built on a raised land aren't destroyed, but on the sea level they are...
I checked it. on R11158 this does not happen, but on R11188.
I will check the differences between these two versions.

edit:
I found the error. It was a little hack in the code.
I had set CheckOwnership in players.cpp to return true without checking.
somewhere between R11158 and R11188 they added code which inserts commands to remove docks everey now and then.
without the working checks in CheckOwnership this removed the docks.

Now I do the correct checks so that a don't need the hack in CheckOwnership anymore. But I think these commands to remove docks are an error, but not mine.

I added a corrected patch. If you enable shared stations shared tracks will be enabled, too. If you disable shared tracks shared stations will be disabled.

If you use this Patch against ChrisIN you have to change the savegame version in saveload.cpp, line 32, and in settings.cpp, lines 1571-1578.
Attachments
shared_r11188.diff
(23.62 KiB) Downloaded 96 times
xmart2k
Engineer
Engineer
Posts: 91
Joined: 04 May 2006 07:36
Contact:

Re: Revival of subsidiaries patch

Post by xmart2k »

i've got a lot of problems applying the patch with chrisIn, can you please upload a diff for the chrisIn only, pleaseeee.
i love this patch.
gagarin
Engineer
Engineer
Posts: 57
Joined: 26 Feb 2006 18:52
Location: Berlin, Germany

Re: Revival of subsidiaries patch

Post by gagarin »

Here is a chrisin+shared patch.
use this in a fresh checkout, not on a patched chrisin.

This patch is untested. It compiles and I started the game but I tested nothing else.
Attachments
chrisin_patched.diff
(528.83 KiB) Downloaded 126 times
User avatar
MeTo
Traffic Manager
Traffic Manager
Posts: 129
Joined: 06 Apr 2003 14:02
Location: UnL; Czech Republic
Contact:

Re: Revival of subsidiaries patch

Post by MeTo »

Thank you, I will test it as soon as I have some time :)
gagarin
Engineer
Engineer
Posts: 57
Joined: 26 Feb 2006 18:52
Location: Berlin, Germany

Re: Revival of subsidiaries patch

Post by gagarin »

You can find the new thread for this project at: http://www.tt-forums.net/viewtopic.php?f=33&t=34292
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 22 guests