Commit dd8a79f5 authored by Daniel Lehmberg's avatar Daniel Lehmberg
Browse files

bugfix, when FootStep is outdated, e.g. due to a waiting event

parent 97c7f970
......@@ -119,7 +119,13 @@ public class Pedestrian extends Agent {
if(currentFootStep == null){
return getPosition();
}else{
return FootStep.interpolateFootStep(currentFootStep, time);
if(time > currentFootStep.getEndTime()){
// This happens for example if a pedestrian is waiting (see Events)
// TODO: check with Bene K. if this is okay, or a better way?
return currentFootStep.getEnd();
}else{
return FootStep.interpolateFootStep(currentFootStep, time);
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment