Commit Graph

5 Commits

Author SHA1 Message Date
Jonathan G Rennison
769b8ae096 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.
2015-11-24 01:03:09 +00:00
Jonathan G Rennison
b2b9c0a070 Progsig: Fix various issues with removing program dependencies.
Fix RemoveProgramDependencies using one parameter for both source
and target, and rename the parameters to something sensible.
Update program window when invalidating in RemoveProgramDependencies.
Make SignalStateCondition::IsSignalValid const and add CheckSignalValid
for non-const validaty checking.
2015-10-03 14:15:58 +01:00
Jonathan G Rennison
1823deae7d Programmable signals: Fix whitespace issues. 2015-10-03 13:51:35 +01:00
Jonathan G Rennison
b7373c3eb5 Check tile type in SignalStateCondition::IsSignalValid()
This is to avoid triggering an assertion, particularly
when clearing the program state in InitializeGame(), as the map has
just been reset, or when deleting a signal referenced by a condition.
2015-10-02 19:01:47 +01:00
patch-import
fc0efe599e Port of the programmable signals patch to recent trunk
Also add some additional changes from the SpringPP patch,
and make some other minor changes/fixes.
2015-08-01 17:06:43 +01:00