Skip to content
Snippets Groups Projects
Commit 124a6fa2 authored by Hengwen Zhang's avatar Hengwen Zhang
Browse files

Fix a small bug that task runners are not correctly registered

parent eac3bfb7
No related branches found
No related tags found
1 merge request!34Vehicle task
...@@ -169,7 +169,7 @@ public class Simulator implements ISimulator, Updatable { ...@@ -169,7 +169,7 @@ public class Simulator implements ISimulator, Updatable {
@Override @Override
public void registerTaskRunner(SimulationObject obj, TaskRunner runner) { public void registerTaskRunner(SimulationObject obj, TaskRunner runner) {
SimulatorState state = (SimulatorState) obj.state; SimulatorState state = (SimulatorState) obj.state;
state.updatableId = taskRunners.size(); state.taskRunnerId = taskRunners.size();
taskRunners.add(runner); taskRunners.add(runner);
} }
...@@ -183,4 +183,8 @@ public class Simulator implements ISimulator, Updatable { ...@@ -183,4 +183,8 @@ public class Simulator implements ISimulator, Updatable {
System.exit(-1); System.exit(-1);
} }
} }
public Vector<Updatable> getUpdatables() {
return updatables;
}
} }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment