progsig: Fix remove and clone program functions being completely broken.
Remove function only removed instructions from the local machine, and was therefore not MP safe. Clone function failed to work correctly for non-trivial cases, and sometimes caused an array out of bounds assertion. These are replaced by a new commandproc which does each operation as a single action, which is therefore MP safe. Remove an unused struct field.
This commit is contained in:
@@ -28,6 +28,11 @@ class SignalInstruction;
|
||||
class SignalSpecial;
|
||||
typedef SmallVector<SignalInstruction*, 4> InstructionList;
|
||||
|
||||
enum SignalProgramMgmtCode {
|
||||
SPMC_REMOVE, ///< Remove program
|
||||
SPMC_CLONE, ///< Clone program
|
||||
};
|
||||
|
||||
/** The actual programmable signal information */
|
||||
struct SignalProgram {
|
||||
SignalProgram(TileIndex tile, Track track, bool raw = false);
|
||||
@@ -212,7 +217,6 @@ class SignalStateCondition: public SignalCondition {
|
||||
SignalReference this_sig;
|
||||
TileIndex sig_tile;
|
||||
Trackdir sig_track;
|
||||
SignalState state;
|
||||
};
|
||||
|
||||
// -- Instructions
|
||||
|
Reference in New Issue
Block a user