From dbe7251c6b1a531e1115dc94f4d48cfa6721e81b Mon Sep 17 00:00:00 2001 From: Anuken Date: Tue, 17 Sep 2019 10:59:40 -0400 Subject: [PATCH] Update Statuses.java --- core/src/io/anuke/mindustry/entities/units/Statuses.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/io/anuke/mindustry/entities/units/Statuses.java b/core/src/io/anuke/mindustry/entities/units/Statuses.java index 62bcec4a2f..7a92a2c128 100644 --- a/core/src/io/anuke/mindustry/entities/units/Statuses.java +++ b/core/src/io/anuke/mindustry/entities/units/Statuses.java @@ -41,7 +41,7 @@ public class Statuses implements Saveable{ entry.effect.getTransition(unit, effect, entry.time, duration, globalResult); entry.time = globalResult.time; - if(globalResult.effect != entry.effect){ + if(globalResult.effect != entry.effect && globalResult.effect != null){ entry.effect = globalResult.effect; } @@ -127,6 +127,7 @@ public class Statuses implements Saveable{ public void writeSave(DataOutput stream) throws IOException{ stream.writeByte(statuses.size); for(StatusEntry entry : statuses){ + stream.writeByte(entry.effect.id); stream.writeFloat(entry.time); }