mirror of
https://github.com/yairm210/Unciv.git
synced 2025-02-10 02:47:24 +07:00
When the currently selected unit dissapears, the executing action also disappears
This commit is contained in:
parent
4d520c8466
commit
9389e936fc
@ -36,7 +36,10 @@ class UnitTable(val worldScreen: WorldScreen) : Table(){
|
|||||||
if(selectedUnit!=null)
|
if(selectedUnit!=null)
|
||||||
{
|
{
|
||||||
try{ selectedUnit!!.getTile()}
|
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) {
|
if(selectedUnit!=null) {
|
||||||
|
Loading…
Reference in New Issue
Block a user