File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -328,7 +328,7 @@ void onFrame(final int frame) {
328
328
List <Unit > getConnected (final Unit unit ) {
329
329
final int frame = getFrameCount ();
330
330
if (lastConnectedUnitsUpdate < frame ) {
331
- connectedUnits .clear ( );
331
+ connectedUnits .values (). forEach ( List :: clear );
332
332
for (final Unit u : getAllUnits ()) {
333
333
Unit owner = u .getCarrier ();
334
334
if (owner == null ) {
@@ -355,7 +355,7 @@ List<Unit> getConnected(final Unit unit) {
355
355
List <Unit > getLoadedUnits (final Unit unit ) {
356
356
final int frame = getFrameCount ();
357
357
if (lastLoadedUnitsUpdate < frame ) {
358
- loadedUnits .clear ( );
358
+ loadedUnits .values (). forEach ( List :: clear );
359
359
for (final Unit u : getAllUnits ()) {
360
360
final Unit owner = u .getTransport ();
361
361
if (owner != null ) {
You can’t perform that action at this time.
0 commit comments