diff --git a/core/src/mindustry/entities/Units.java b/core/src/mindustry/entities/Units.java index 998c2c05f3..a641bac7a8 100644 --- a/core/src/mindustry/entities/Units.java +++ b/core/src/mindustry/entities/Units.java @@ -214,7 +214,10 @@ public class Units{ } }); - return buildResult; + var result = buildResult; + buildResult = null; + + return result; } /** Iterates through all buildings in a range. */ diff --git a/core/src/mindustry/entities/comp/PlayerComp.java b/core/src/mindustry/entities/comp/PlayerComp.java index b72fe2946c..fe787a8336 100644 --- a/core/src/mindustry/entities/comp/PlayerComp.java +++ b/core/src/mindustry/entities/comp/PlayerComp.java @@ -183,7 +183,9 @@ abstract class PlayerComp implements UnitController, Entityc, Syncc, Timerc, Dra if(!unit.isNull()){ clearUnit(); } - lastReadUnit = justSwitchTo = justSwitchFrom = null; + + lastReadUnit = Nulls.unit; + justSwitchTo = justSwitchFrom = null; } public void team(Team team){ diff --git a/gradle.properties b/gradle.properties index 63ba2cb1ef..1f85852147 100644 --- a/gradle.properties +++ b/gradle.properties @@ -25,4 +25,4 @@ org.gradle.caching=true #used for slow jitpack builds; TODO see if this actually works org.gradle.internal.http.socketTimeout=100000 org.gradle.internal.http.connectionTimeout=100000 -archash=f1e4bdee85 +archash=774bfa97b0