correctly selecting the deselectable unit

This commit is contained in:
devZoGok
2023-12-09 11:44:08 +02:00
parent 0af2aac93c
commit 68a083172a
+1 -1
View File
@@ -132,7 +132,7 @@ namespace battleship{
void Player::removeUnit(int id){
if(units[id]->isSelected())
deselectUnit(id);
units[id]->toggleSelection(false);
delete units[id];
units.erase(units.begin() + id);