Fixed #4882
This commit is contained in:
@@ -50,6 +50,9 @@ public class UnitPayload implements Payload{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean dump(){
|
public boolean dump(){
|
||||||
|
//TODO should not happen
|
||||||
|
if(unit.type == null) return true;
|
||||||
|
|
||||||
if(!Units.canCreate(unit.team, unit.type)){
|
if(!Units.canCreate(unit.team, unit.type)){
|
||||||
deactiveTime = 1f;
|
deactiveTime = 1f;
|
||||||
return false;
|
return false;
|
||||||
@@ -81,6 +84,9 @@ public class UnitPayload implements Payload{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void draw(){
|
public void draw(){
|
||||||
|
//TODO should not happen
|
||||||
|
if(unit.type == null) return;
|
||||||
|
|
||||||
Drawf.shadow(unit.x, unit.y, 20);
|
Drawf.shadow(unit.x, unit.y, 20);
|
||||||
Draw.rect(unit.type.icon(Cicon.full), unit.x, unit.y, unit.rotation - 90);
|
Draw.rect(unit.type.icon(Cicon.full), unit.x, unit.y, unit.rotation - 90);
|
||||||
unit.type.drawCell(unit);
|
unit.type.drawCell(unit);
|
||||||
|
|||||||
Reference in New Issue
Block a user