Commit 502696d6 authored by Benedikt Zoennchen's avatar Benedikt Zoennchen
Browse files

grps will now be drawn if the group size is not available.

parent 2ae965fc
Pipeline #70374 passed with stages
in 64 minutes and 22 seconds
......@@ -67,7 +67,7 @@ public class AgentRender implements Renderer {
}
public Color getGroupColor(Pedestrian ped) {
if (ped.getGroupIds().isEmpty() || (!ped.getGroupSizes().isEmpty() && ped.getGroupSizes().getFirst() <= 1)) {
if (ped.getGroupIds().isEmpty() || (!ped.getGroupSizes().isEmpty() && ped.getGroupSizes().getFirst() == 1)) {
return defaultColor;
}
......@@ -81,7 +81,7 @@ public class AgentRender implements Renderer {
}
public VShape getShape(Pedestrian ped) {
if (ped.getGroupIds().isEmpty() || (!ped.getGroupSizes().isEmpty() && ped.getGroupSizes().getFirst() <= 1)) {
if (ped.getGroupIds().isEmpty() || (!ped.getGroupSizes().isEmpty() && ped.getGroupSizes().getFirst() == 1)) {
return ped.getShape();
} else if (ped.getGroupIds().getFirst() == 1) {
return ped.getShape();
......
......@@ -58,7 +58,7 @@ public class CentroidGroupPotential implements PotentialFieldAgent {
CentroidGroup group = groupCollection.getGroup(ped);
Pedestrian leader = null;
if (group != null) {
if (group != null && group.getSize() > 1) {
leader = group.getPacemaker(ped);
}
......
Supports Markdown
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