22 if (!
Global.
getSector().getCurrentLocation().isHyperspace())
return null;
24 Vector2f loc = pf.getLocation();
29 if (plugin ==
null)
return null;
31 float [] coords = plugin.getLengthAndWidthFractionWithinStream(loc, 0f,
false, radius);
32 if (coords ==
null)
return null;
34 SlipstreamSegment start = plugin.getSegmentForDist(coords[0]);
35 if (start ==
null)
return null;
37 List<SlipstreamSegment> segments = plugin.getSegments();
39 List<SensorGhost> result =
new ArrayList<SensorGhost>();
41 int num = 1 + manager.
getRandom().nextInt(5);
43 float distBehind = 1000f;
45 for (
int i = start.index - 1; i >= 0f && num > 0; i--) {
46 SlipstreamSegment curr = segments.get(i);
47 currDist += curr.lengthToNext;
49 float b = plugin.getFaderBrightness(coords[0]);
50 if (currDist > distBehind && b > 0) {
56 distBehind += 500f * manager.
getRandom().nextFloat();