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
......@@ -118,10 +118,16 @@ public class Pedestrian extends Agent {
public VPoint getInterpolatedFootStepPosition(double time){
if(currentFootStep == null){
return getPosition();
}else{
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);
}
}
}
// Setter
public void setIdAsTarget(int id) { this.idAsTarget = id; }
......
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