mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-11 13:10:45 +00:00
progsig: Fix signal dependency being left dangling after cycling side.
If the target of a programmable signal dependency was cycled to the other side, the dependency was not cleared. As the dependency was then no longer valid, it was not cleared by the programmable signal. Deleting the programmable signal and then the target signal resulted in a crash.
This commit is contained in:
parent
769b8ae096
commit
1e9433e0ff
@ -1120,6 +1120,8 @@ CommandCost CmdBuildSingleSignal(TileIndex tile, DoCommandFlag flags, uint32 p1,
|
||||
SetPresentSignals(tile, (GetPresentSignals(tile) & ~SignalOnTrack(track)) | KillFirstBit(SignalOnTrack(track)));
|
||||
}
|
||||
} else {
|
||||
/* programmable signal dependencies are invalidated when the signal direction is changed */
|
||||
CheckRemoveSignal(tile, track);
|
||||
/* cycle the signal side: both -> left -> right -> both -> ... */
|
||||
CycleSignalSide(tile, track);
|
||||
/* Query current signal type so the check for PBS signals below works. */
|
||||
|
Loading…
Reference in New Issue
Block a user