This commit is contained in:
Anuken
2021-03-06 17:25:03 -05:00
parent 79a62cd74c
commit b51d34e893

View File

@@ -50,6 +50,9 @@ public class UnitPayload implements Payload{
@Override
public boolean dump(){
//TODO should not happen
if(unit.type == null) return true;
if(!Units.canCreate(unit.team, unit.type)){
deactiveTime = 1f;
return false;
@@ -81,6 +84,9 @@ public class UnitPayload implements Payload{
@Override
public void draw(){
//TODO should not happen
if(unit.type == null) return;
Drawf.shadow(unit.x, unit.y, 20);
Draw.rect(unit.type.icon(Cicon.full), unit.x, unit.y, unit.rotation - 90);
unit.type.drawCell(unit);