New block stats / Junction bugfixes

This commit is contained in:
Anuken
2019-05-02 23:10:41 -04:00
parent eaa2ad4f05
commit b2408b1a7c
17 changed files with 44 additions and 40 deletions
@@ -1,7 +1,5 @@
package io.anuke.mindustry.entities.effect;
import io.anuke.annotations.Annotations.Loc;
import io.anuke.annotations.Annotations.Remote;
import io.anuke.arc.collection.IntMap;
import io.anuke.arc.math.Mathf;
import io.anuke.arc.math.geom.Geometry;
@@ -74,11 +72,6 @@ public class Fire extends TimedEntity implements SaveTrait, SyncTrait, Poolable{
}
}
@Remote(called = Loc.server)
public static void onFireRemoved(int fireid){
fireGroup.removeByID(fireid);
}
@Override
public float lifetime(){
return lifetime;
@@ -94,18 +87,17 @@ public class Fire extends TimedEntity implements SaveTrait, SyncTrait, Poolable{
Effects.effect(Fx.fireSmoke, x + Mathf.range(4f), y + Mathf.range(4f));
}
if(Net.client()){
return;
}
time = Mathf.clamp(time + Time.delta(), 0, lifetime());
if(time >= lifetime() || tile == null){
Call.onFireRemoved(getID());
remove();
return;
}
if(Net.client()){
return;
}
TileEntity entity = tile.target().entity;
boolean damage = entity != null;