When the currently selected unit dissapears, the executing action also disappears
This commit is contained in:
parent
4d520c8466
commit
9389e936fc
1 changed files with 4 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue