Commit Graph

6 Commits (2895b1921d00fd8af0cc3f85f5b8e2f53989092f)

Author SHA1 Message Date
Jonathan G Rennison e459ebe2ad Remove assert.h include from progsig, as this overrides OpenTTD's assert 7 years ago
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.
9 years ago
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.
9 years ago
Jonathan G Rennison 1823deae7d Programmable signals: Fix whitespace issues. 9 years ago
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.
9 years ago
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.
9 years ago