Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tram deadlock, r10975 #1160

Closed
DorpsGek opened this issue Aug 26, 2007 · 12 comments
Closed

Tram deadlock, r10975 #1160

DorpsGek opened this issue Aug 26, 2007 · 12 comments
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

sedlacl opened the ticket and wrote:

Hi, I found an ugly bug - don't know if reported by anyone else. If you build tram track without end loop, you can get serious trouble. The tram is trying to find path, but no exists. Tram is continuously accelerating from 0 to 8km/h, can't be reversed and of course title can't be modified, because of train on it => so when you can't build depot (track doesn't help, try it) in next title, you have uncontrolable tram...

Attachments

Reported version: trunk
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/1160
@DorpsGek
Copy link
Member Author

SmatZ wrote:

Maybe a connected problem - when a train is reversing on a curved line, it goes out of the track

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/1160#comment1966

@DorpsGek
Copy link
Member Author

SmatZ wrote:

It may even be a straight line, train cannot be reversed...
(wasn't this solved once?)

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/1160#comment1967

@DorpsGek
Copy link
Member Author

Rubidium wrote:

Trams can only reverse when there is a tile after the current tile.

Once the tram has reached the "end" of the line it cannot be turned (easily) as it cannot be hooked (nicely) into a "turning vehicle" state, basically because it has overshot the entrance point for that "state".


This comment was imported from FlySpray: https://bugs.openttd.org/task/1160#comment1968

@DorpsGek
Copy link
Member Author

SmatZ wrote:

What about adding the ability to manually crash vehicles? (say, by clicking Ctrl+start/stop)
(wouldn't that be a generally useful feature?)

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/1160#comment1972

@DorpsGek
Copy link
Member Author

Rubidium wrote:

Crash as in "normally" crash, or just obliterating the vehicle so it will not block other vehicles for the next few months? And then, should crashing/obliterating influence the station ratings in the neighbourhood? I think it should so people won't use it as an easy way to get rid of redundant vehicles.


This comment was imported from FlySpray: https://bugs.openttd.org/task/1160#comment1973

@DorpsGek
Copy link
Member Author

SmatZ wrote:

I agree, the rating should be decreased and vehicle should block others - otherwise it could be overused instead of sending vehicles to a depot.

I did just a little change to the code - but there are some more things that should be done and decided:

can vehicle be crashed while stopped? while stopped in a depot? (if so,can the vehicle be sold?) while in a station? what about the newgrf callbacks? can vehicle be crashed, when it cannot be stopped?
new newspaper message should be done - drivers and passangers won't die. should vehicle have the explosion animation? and rotate itself?
what about aircrafts? can they be crashed while flying, landing and taking-off?
and ships? i think ships cannot crash under any circumstances in the current code... ships can be blocked by building land around them and purchasing the land by other player, so there may be some need to crash them

should the "crash" cost money - eg. for area clearing? should the price be added to normal crashes?

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/1160#comment1976

@DorpsGek
Copy link
Member Author

Rubidium wrote:

I think:
- crashing should only be possible when the vehicle is not stopped in a depot (except for aircraft as you do not know which blocks they have "taken", so you can't free them, or we have to wait for NewGRF ports which makes that easy)
- crashing should not block other vehicles; just blow (with animation) the vehicle and be done with it. This makes crashing aircraft in-sky/ships "simple".
- manual crashes must reduce the rating (probably even more than normal crashes)
- just use the news message (and just kill the drivers and passangers ;))
- crashing should cost money; I think the current value of the whole consist, but normal crashes should not cost anything.

Furthermore there should be some "are you sure" dialog.


This comment was imported from FlySpray: https://bugs.openttd.org/task/1160#comment1977

@DorpsGek
Copy link
Member Author

SmatZ wrote:

Well, I did something...

it is not 100% okay -> messages are wrong, aircrafts crash in the air, ships just disappear...

use: Ctrl+click on the start/stop button

is it worth continuing on that code?

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/1160#comment1980

@DorpsGek
Copy link
Member Author

bilbo wrote:

I am not sure if the ability to explode your own vehicles is the proper solution. But the tram-deadlock should be fixed. I think best way would be to implement rotating the tram (probably by using some crane, so this would be expensive and time-consuming) or allowing the tram to move backwards temporarily (with some very low speed) in some emergency situations like that, allowing yo to fix the deadlock (I assume, that when you reverse the tram, it will start going back until it hits some junction or depot or you stop it)


This comment was imported from FlySpray: https://bugs.openttd.org/task/1160#comment2690

@DorpsGek
Copy link
Member Author

someone583 wrote:

A simpler solution is to allow to build tramways on front of the stuck tram and making sure the tram will go over it.
and a message that says the tram is stuck or lost.


This comment was imported from FlySpray: https://bugs.openttd.org/task/1160#comment2723

@DorpsGek
Copy link
Member Author

bilbo wrote:

someone: unfortunately, that is not (always) possible, as here we have case where tram is stuck on the last tile and building more track in front of the tram is not possible - because the tile on which the track need to be built is occupied by something unbulldozeable (industry, lighthouse, something built by competitor, edge of map ...)

But the message "the tram is stuck" may be useful ... as are the "train is lost" messages to inform you of some bug in routes ...


This comment was imported from FlySpray: https://bugs.openttd.org/task/1160#comment2725

@DorpsGek
Copy link
Member Author

Rubidium closed the ticket.

Reason for closing: Fixed

In r11449.


This comment was imported from FlySpray: https://bugs.openttd.org/task/1160

@DorpsGek DorpsGek added flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) Trams labels Apr 6, 2018
This was referenced Apr 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)
Projects
None yet
Development

No branches or pull requests

1 participant