Infrastructure Sharing

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

User avatar
Thief^
Route Supervisor
Route Supervisor
Posts: 469
Joined: 10 Oct 2004 00:11

Re: Infrastructure Sharing

Post by Thief^ »

Fixed drive-through road stops / trams.
Attachments
IS_v05_r14422_DriveThroughFix.patch
(139.45 KiB) Downloaded 154 times
Melt with the Shadows,
Embrace your destiny...
Plopsi
Engineer
Engineer
Posts: 6
Joined: 03 Sep 2008 13:12

Re: Infrastructure Sharing

Post by Plopsi »

ah great thx, this will simplify the game because i don't have to build endstations for other players trucks :)
deepblue2k8
Engineer
Engineer
Posts: 44
Joined: 06 Sep 2008 12:41
Location: Hamburg, Germany

Re: Infrastructure Sharing

Post by deepblue2k8 »

I got a crash of ottd with your last patched applied to r14422 build on MS VS2008.

It crashed, when one of the companies disabled track sharing while foreign trains where on its tracks.
The game will crash after 30th June.


*** OpenTTD Crash Report ***
Date: 2008-10-24 02:09:46
Build: r14481M built on Oct 24 2008 00:46:26
Reason: Assertion failed at c:\users\deepblue1\desktop\openttdsource\src\map_func.h:352: IsValidDiagDirection(dir)
Language: origveh.lng
Exception C0000005 at 004C22DB
Registers:
EAX: 0075FF70 EBX: 000000FF ECX: 0017F54C EDX: 0075FFDB
ESI: 006017E0 EDI: 006017E0 EBP: 0000F491 ESP: 0017F764
EIP: 004C22DB EFLAGS: 00010202

Bytes at CS:EIP:
C6 05 00 00 00 00 00 8B 14 B5 C0 05 5B 00 8B 0D E0 0F 60 00 8B C2 C1 E8

Stack trace:
00438A97 006017E0 0000F491 0017FAD8 00000000 016017E0 00000000 00438CF5
00000000 00436FC1 0000F491 006017E0 00000000 04494110 00000006 00437242
00000000 0455E21C 00000000 005BA744 00000084 0000F38E 0000F38E 0000F38F
0000F38F 0000F390 0000F490 0000F491 0000F591 0000F592 0000F692 0000F387
0000F387 00000000 75C8B562 00000001 0017F810 73990C5E 00000000 00000000
00000000 001B0023 7399543F 75C88790 75CF0344 03273D60 0017F858 75C8B634
75C8B600 92207D64 00000000 00000084 00000000 00000001 00000001 0017F828
00000000 0017F97C 75CE85E7 E7FF3334 FFFFFFFE 75C8B600 004F4608 000214A6
00000084 00000000 001B0023 00000000 004F40AA 00000000 00000000 0000000A
00000000 0017F9FF 0017F9B4 00000000 0017F9F3 00000000 0017F8D8 00000029
0017F8B8 004DBFB5 0017FA04 00602390 00000000 0017F9AC 004F40AA 00000000
00000000 00030001 7EFDB800 0017F8F0 75C87BF3 00F41C90 00000000 0017F9EC
0017F9EC 7750596F 7750594E 0E0113C8 00000000 00000000 00000780 0000047E
570112A6 00000000 77A8FA88 76C559B5 029D0000 00000000 029D019C 00000000
029D018C 00B60012 00000B90 022A00EA 00000BBE 00000000 0017F94C 00660348
00000014 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000002 00000002 017A473D FFFFFFFE 77A8FA88
77A8F945 77AB2F1F 00000014 00000000 00000004 00000000 00000000 00000780
004F40AA 00000000 006911E0 0000047E 0017FA04 0044BE69 00000002 00616764
0044D98A 00000001 00480E95 0000001B 00000001 000000F2 00481294 005EA1D0
00000001 0069174C 000000F2 00660348 00000000 00000000 000000F2 00000000
0017FA28 004812E8 0069174C 0000000C FFFFFF0E FFFFFFFF 0001FFFF FFFFFFFF
FFFFFF0E 0017FB50 004365BF 0000000C FFFFFF0E 006911E0 00436707 0166E121
00000001 00000000 0017FAA8 000000F2 00000000 00000B6F 00000000 00000000
Attachments
IS Crash Fronnton Transport, 1st Jun 1950.sav
(81.77 KiB) Downloaded 117 times
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Infrastructure Sharing

Post by planetmaker »

Thx for the report. I'll have a look, hopefully I'll have sufficient time soon :) .
deepblue2k8
Engineer
Engineer
Posts: 44
Joined: 06 Sep 2008 12:41
Location: Hamburg, Germany

Re: Infrastructure Sharing

Post by deepblue2k8 »

hehe,

the patch is already totally awesome! :-)
Without disabling tracksharing i didnt run into any crashes yet. Is there a possibility to allow players only to change their track fee, but not to disable tracksharing?
I tried to allow individual sharing settings, but disabled "Enable shared railway tracks" in the advanced settings. In the user settings the buttons for enabling are disabled but still on "yes". It seems that this did what i wanted, but is it supposed to work that way? :-)

Oh, i forget to tell that the savegame has two newgrfs: egrvts and planeset, but since i only build 2 trains it should work without them.

Markus
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Infrastructure Sharing

Post by planetmaker »

Hi,

nice to hear that you like it :)
deepblue2k8 wrote: Is there a possibility to allow players only to change their track fee, but not to disable tracksharing?
When "individual sharing" is enabled, you can set indiviudal fees: open your company window (the button with the manager face). You should find below to the HQ button a "sharing" button which will open a window where you can adjust the fees.
BlutRoyale
Engineer
Engineer
Posts: 1
Joined: 13 Jun 2007 08:03
Contact:

Re: Infrastructure Sharing

Post by BlutRoyale »

can someone compile it please using the latest nightly? thanks a lot.
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Infrastructure Sharing

Post by planetmaker »

BlutRoyale wrote:can someone compile it please using the latest nightly? thanks a lot.
Yes. Actually, if the last revisions didn't break it, anyone could do it :) . I even have a compiled version one at home. Do you have a Mac?
Xorppa
Engineer
Engineer
Posts: 5
Joined: 28 Dec 2007 14:44

Re: Infrastructure Sharing

Post by Xorppa »

yes i've got a mac!
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Infrastructure Sharing

Post by planetmaker »

Ok, things are a bit difficult. The patch currently has some bugs, e.g. the game crashes when you enable sharing on a per-company basis which I'm unable to pin. That's why I actually - despite my opposite intentions - will refrain from posting a binary; it will be not much fun... :S

No significant changes, just a bit coding style.
Attachments
is_v06_r14536.diff
updated to r14536.
(134.55 KiB) Downloaded 176 times
dbkblk
Traffic Manager
Traffic Manager
Posts: 154
Joined: 29 Mar 2008 18:38

Re: Infrastructure Sharing

Post by dbkblk »

hi ! i play with a friend with the last windows build cargodest / infrsharing but we often got a nice CTD server side !
I send you the log file !

H.
Attachments
crash.zip
(4.1 KiB) Downloaded 132 times
Aali
Traffic Manager
Traffic Manager
Posts: 144
Joined: 01 Oct 2008 00:04
Location: Sweden

Re: Infrastructure Sharing

Post by Aali »

After a lot of debugging and some rewriting, I have nailed down a few crash issues related to articulated engines and companies going bankrupt/disabling sharing.
I have also fixed the issue with train owners being able to start/stop trains on others track.

These two issues were caused by code changes in trunk, and there's no real change in functionality there.

What i have changed is start/stop behavior for aircraft, previously you could stop your planes on someone elses airport, this has been changed to behave more like trains, only the owner of an airport can start/stop aircraft that are on the ground and not in a hangar (where both parties can start/stop the planes).


Patch for r14589 attached.

:EDIT:

Almost forgot to mention; some calculations regarding feeders and their payment have been changed, report any odd behavior!
Attachments
is_v061_r14589.patch
(137.12 KiB) Downloaded 183 times
dbkblk
Traffic Manager
Traffic Manager
Posts: 154
Joined: 29 Mar 2008 18:38

Re: Infrastructure Sharing

Post by dbkblk »

Could you make a win32 build with cargodest please ?
Aali
Traffic Manager
Traffic Manager
Posts: 144
Joined: 01 Oct 2008 00:04
Location: Sweden

Re: Infrastructure Sharing

Post by Aali »

dbkblk wrote:Could you make a win32 build with cargodest please ?
No.

Supporting this patch alone is a lot of work, merging it with cargodest is even more work and to top it off, you would come to me when it doesn't work. :P

Sorry, but you'll have to do it yourself or find someone who will do it for you.

Oh and as far as I can tell from the log, the crashing issue you were having was not related to IS.
dbkblk
Traffic Manager
Traffic Manager
Posts: 154
Joined: 29 Mar 2008 18:38

Re: Infrastructure Sharing

Post by dbkblk »

Okay, don't be sorry. I perfectly understand that ! I prefer you said no than nothing !
You've made great things with this patch already ^^

The error log is may due to a grf or a cargodest version !

I will try to make a build myself (even with my very thin knowledge on the subject).
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Infrastructure Sharing

Post by planetmaker »

We set up a mercurial repository which we'll use in order to produce a re-write of this patch. It can be found at

http://mz.openttdcoop.org:8000/

Anyone can download. Submission can be granted upon request, or post patches to the repository or updates in this thread.
Currently Aali, Yorick and myself have commit rights.

Let's see how it will work out :)
el koeno
Route Supervisor
Route Supervisor
Posts: 454
Joined: 24 Sep 2004 15:47

Re: Infrastructure Sharing

Post by el koeno »

planetmaker wrote:We set up a mercurial repository which we'll use in order to produce a re-write of this patch. It can be found at

http://mz.openttdcoop.org:8000/

Anyone can download. Submission can be granted upon request, or post patches to the repository or updates in this thread.
Currently Aali, Yorick and myself have commit rights.

Let's see how it will work out :)
Good to see people working on this!

However, only once cargodest makes trunk I might consider playing it. :wink:
croxis
Engineer
Engineer
Posts: 13
Joined: 29 Oct 2006 18:15

Re: Infrastructure Sharing

Post by croxis »

I tried to compile but there be an error (which I am sure you already know about)!

..\src\company_cmd.cpp(975) : error C2065: 'UINT8_MAX' : undeclared identifier
Aali
Traffic Manager
Traffic Manager
Posts: 144
Joined: 01 Oct 2008 00:04
Location: Sweden

Re: Infrastructure Sharing

Post by Aali »

croxis wrote:I tried to compile but there be an error (which I am sure you already know about)!

..\src\company_cmd.cpp(975) : error C2065: 'UINT8_MAX' : undeclared identifier
I need some more info here, which revision did you patch against? (And which version of the patch did you use?) From the error message I assume you're using VC++, are you able to compile a clean checkout of OpenTTD?
Hirundo
Transport Coordinator
Transport Coordinator
Posts: 298
Joined: 27 Jan 2008 13:02

Re: Infrastructure Sharing

Post by Hirundo »

When looking at the IS changelog I spotted this:
IS Changelog wrote:Change[IS]: (player-specific)Allow changing fees directly when they're lower than they were before and permissions when they are more open
(http://mz.openttdcoop.org:8000/rev/624e129843b5)
This means that if you accidentally press a wrong button, you open up your infrastructure for at least X months, because you cannot undo it. I'm not sure whether that is intended behaviour, as a single mistake would allow others to jam your tracks or airports. For changing fees it may not be much of a problem, but opening up infrastructure, without the possibility of undoing that, is a bad thing IMO.

Also, I think the magic numbers in CmdChangeSharingSetting should be enumerated.
Create your own NewGRF? Check out this tutorial!
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 10 guests