Signals in tunnels and on bridges V3.02 r24031

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
fivejc
Engineer
Engineer
Posts: 12
Joined: 22 Sep 2009 08:03

Re: signals in tunnels and on bridges V26 r17552

Post by fivejc »

1. Try loading older save game, I can't load the one you send. :(
The game is verifying the vehicle ID's and encounters a non valid ID while it is loading and aborts.
So maybe savegame is corrupted.

2..Try with an old autosave game.

3.Another possibility is conflicting .grf files.
unfortunately all savegames (autosaves) are corrupted. It seems that problem is with grf file: tropic refurbisment set v0.3.1.
benom
Engineer
Engineer
Posts: 10
Joined: 01 Oct 2009 10:00

Re: signals in tunnels and on bridges V26 r17552

Post by benom »

i seem to have found a bug (Terkhen patch pack v8) when i drag signals under an industry making the next signal apearing just inside the tunnel it crashes. this doesn't seem to an issue with towns
bug here
bug here
bug.JPG (77.85 KiB) Viewed 1481 times
User avatar
HackaLittleBit
Director
Director
Posts: 550
Joined: 10 Dec 2008 16:08
Location: tile 0x0000

Re: signals in tunnels and on bridges V26 r17552

Post by HackaLittleBit »

benom wrote:i seem to have found a bug
Confirmed!

if this line

Code: Select all

	if (!CheckTileOwnership(tile)) return CMD_ERROR;
goes back to its original place eg. line 859 of rail_cmd.cpp r17680
no more warnings :)

Next week I will update patch because I am not shure about consequences yet.

Regards HackaLittleBit

edit: Thanks benom
User avatar
bigos
Traffic Manager
Traffic Manager
Posts: 181
Joined: 13 Sep 2009 21:15
Location: Poland
Contact:

Re: signals in tunnels and on bridges V26 r17552

Post by bigos »

I think I found a bug. It occur only in multi player games. When you make bridge and put signals on it after few clicks they stop changes to single signals. In single player game seems to be OK.
User avatar
HackaLittleBit
Director
Director
Posts: 550
Joined: 10 Dec 2008 16:08
Location: tile 0x0000

Re: signals in tunnels and on bridges V26 r17552

Post by HackaLittleBit »

bigos wrote:I think I found a bug
Thanks for reporting bigos.
I do not 100 % understand what is happening there but I can tell you that I have completely rewritten the signal placing code.
I will post the next revision somewhere in the future.
I just can tell you that that he new code for placing signals will behave the same as the exsisting normal signal placing code.
I am testing now new code to set signal to green behind the train after it enters the tunnel according to the amount of tiles you have set in advanced settings.
Also semafores or light signals will be visible according to the date set in your advanced settings.
What I can do is send this pach of the signal placing code for you to test. Maybe that helps,

I will update patch as soon as possible. :roll:

EDIT: some procedure names changed;

IsTunnelBridgePairWithSignals -> IsTunnelBridgeWithSignalSimulation
IsTunnelBridgeWithSignal -> IsTunnelBridgeWithSign
SetBitTunnelBridgeSignal -> SetBitTunnelBridgeSign
ClrBitTunnelBridgeSignal -> ClrBitTunnelBridgeSign




Regards HackaLittleBit
Attachments
signal_placing.patch
(5.62 KiB) Downloaded 180 times
User avatar
bigos
Traffic Manager
Traffic Manager
Posts: 181
Joined: 13 Sep 2009 21:15
Location: Poland
Contact:

Re: signals in tunnels and on bridges V26 r17552

Post by bigos »

hackalittlebit wrote: What I can do is send this pach of the signal placing code for you to test. Maybe that helps,
It seems it helped.
User avatar
bigos
Traffic Manager
Traffic Manager
Posts: 181
Joined: 13 Sep 2009 21:15
Location: Poland
Contact:

Re: signals in tunnels and on bridges V26 r17552

Post by bigos »

hackalittlebit wrote:I will post the next revision somewhere in the future.
Close future ? :)
User avatar
HackaLittleBit
Director
Director
Posts: 550
Joined: 10 Dec 2008 16:08
Location: tile 0x0000

Re: signals in tunnels and on bridges V26 r17552

Post by HackaLittleBit »

I'am busy I'am Busy.

I am rewriting chunks of the code and I wan't to take my time before I show it.
I am trying to take out the possibility of not being able to crash when inside tunnel with signal.

You will hear from me when I am ready. :)

Regards HackaLittleBit
User avatar
HackaLittleBit
Director
Director
Posts: 550
Joined: 10 Dec 2008 16:08
Location: tile 0x0000

Re: signals in tunnels and on bridges V26 r17552

Post by HackaLittleBit »

Made a update to trunk.
Little change in signal placing code.
Placing signals should work the same as normal signal placing.

I am thinking about taking out the feature of "two way tunnel" with signals.
So "one way" signals in tunnels only.

Your reaction please. :)

Regards HackaLittleBit

P.S see first post for patch
User avatar
Core Xii
Traffic Manager
Traffic Manager
Posts: 228
Joined: 08 Apr 2008 09:47
Location: Finland

Re: signals in tunnels and on bridges V26 r17552

Post by Core Xii »

hackalittlebit wrote:Your reaction please. :)
I've never used tunnels bi-directionally and can't imagine I ever will. Whatever gets this patch done the quickest :wink:
Terkhen
OpenTTD Developer
OpenTTD Developer
Posts: 1034
Joined: 11 Sep 2008 07:32
Location: Spain

Re: signals in tunnels and on bridges V27 r18047

Post by Terkhen »

It depends. Two way signals is a trunk feature: if you are aiming for trunk inclusion you should support it too. If you think that the patch will not be ready to be submitted in the near future and taking out two way signals in tunnels / bridges helps in development, it could be taken out temporally. Personally, I have never used bidirectional tunnels.
ZxBiohazardZx
Tycoon
Tycoon
Posts: 1534
Joined: 14 Mar 2006 12:46
Location: Netherlands

Re: signals in tunnels and on bridges V27 r18047

Post by ZxBiohazardZx »

hackalittlebit wrote:Made a update to trunk.
Little change in signal placing code.
Placing signals should work the same as normal signal placing.

I am thinking about taking out the feature of "two way tunnel" with signals.
So "one way" signals in tunnels only.

Your reaction please. :)

Regards HackaLittleBit

P.S see first post for patch

yeah remove them, if you have a single track tunnel, you never use it SIGNALLED for both sides, you just place signals in front of it (you dont neeed the 2-way ability with signals INSIDE, just for 1-way its usefull
User avatar
HackaLittleBit
Director
Director
Posts: 550
Joined: 10 Dec 2008 16:08
Location: tile 0x0000

Re: signals in tunnels and on bridges V27 r18047

Post by HackaLittleBit »

ZxBiohazardZx wrote:you just place signals in front of it
Yep thats how you should solve it!
And I could simplify the code.

Ill wait some time with changes but I do apreciate the reactions. :)

Regards
User avatar
Torben DH
Transport Coordinator
Transport Coordinator
Posts: 291
Joined: 31 Dec 2004 09:09
Location: Denmark

Re: signals in tunnels and on bridges V27 r18047

Post by Torben DH »

nice to see this patch is still being worked on it must not die!
TDH
User avatar
HackaLittleBit
Director
Director
Posts: 550
Joined: 10 Dec 2008 16:08
Location: tile 0x0000

Re: signals in tunnels and on bridges V28 r18394

Post by HackaLittleBit »

Torben Paw wrote:it must not die!
It won't.
But this version I am going to leave alone.

I am going to continue with one way signals, and in tunnels only for the time being.
I am sorry for the pace of changes but lack of time is the reason.
As soon as I have something new I will poste it here.

Now it is possible to have semaphores on the tunnel entrance.(terkhen)
This you can change according to your advanced settings.
"Automaticaly build semaphores before xxxx"
Have fun :)

Regards

P.S. In due time I will update my wiki and I will report known bugs.
petert
Tycoon
Tycoon
Posts: 3008
Joined: 02 Apr 2009 22:43
Location: Massachusetts, USA

Re: signals in tunnels and on bridges V28 r18394

Post by petert »

hackalittlebit wrote:This you can change according to your advanced settings.
"Automaticaly build semaphores before xxxx"
Do you think that GUI interface would be hard to implement?
User avatar
nex259
Engineer
Engineer
Posts: 11
Joined: 13 Mar 2009 13:52

Re: signals in tunnels and on bridges V28 r18394

Post by nex259 »

I think that the "2-way tunnel/bridge" function is similar to one of the function which included in "Longer PBS reservation" (exclusive path reservation on 'bi-directional single-track' ) .
---
Sorry my bad English...
nex259
---
User avatar
ColdIce
Transport Coordinator
Transport Coordinator
Posts: 314
Joined: 25 Apr 2006 10:22
Location: Bucharest

Re: signals in tunnels and on bridges V29 r19091

Post by ColdIce »

any chance for this to be updated? please?

LE: hackalittlebit, thank you so much! :bow:
The rest is confetti!
User avatar
ColdIce
Transport Coordinator
Transport Coordinator
Posts: 314
Joined: 25 Apr 2006 10:22
Location: Bucharest

Re: signals in tunnels and on bridges V29 r19256

Post by ColdIce »

:oops: sorry to bother you, but i get this error on MSVC++ 2008

4>group_cmd.cpp
4>..\src\rail_cmd.cpp(925) : error C2065: 'cost' : undeclared identifier
4>..\src\rail_cmd.cpp(927) : error C2065: 'cost' : undeclared identifier
4>..\src\rail_cmd.cpp(967) : error C2065: 'cost' : undeclared identifier
4>dummy_land.cpp

and 2 warnings

4>..\src\tunnelbridge_cmd.cpp(900) : warning C4308: negative integral constant converted to unsigned type
4>..\src\tunnelbridge_cmd.cpp(900) : warning C4307: '+' : integral constant overflow

I searched on google, trying to solve the problem myself, but no obvious results for me.
The rest is confetti!
fivejc
Engineer
Engineer
Posts: 12
Joined: 22 Sep 2009 08:03

Re: signals in tunnels and on bridges V29 r19256

Post by fivejc »

Same problem as ColdIce. I can't compile with revision 19256.
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 19 guests