When the currently selected unit dissapears, the executing action also disappears

This commit is contained in:
Yair Morgenstern 2018-05-25 18:38:57 +03:00
parent 4d520c8466
commit 9389e936fc

View file

@ -36,7 +36,10 @@ class UnitTable(val worldScreen: WorldScreen) : Table(){
if(selectedUnit!=null)
{
try{ selectedUnit!!.getTile()}
catch(ex:Exception) {selectedUnit=null} // The unit that was there no longer exists}
catch(ex:Exception) {
selectedUnit=null;
currentlyExecutingAction=null
} // The unit that was there no longer exists}
}
if(selectedUnit!=null) {