Units move using the new pathfinding system

Minor refactoring
This commit is contained in:
devZoGok
2022-08-27 19:22:13 +03:00
parent 5d4803b083
commit e33919160f
14 changed files with 127 additions and 58 deletions
+1 -1
View File
@@ -300,7 +300,7 @@ namespace battleship{
case Bind::TOGGLE_SUB:
if (isPressed) {
for (Unit *u : selectedUnits) {
if (u->getPlayer() == mainPlayer && u->getType() == UnitType::SUBMARINE) {
if (u->getPlayer() == mainPlayer && u->getUnitClass() == UnitClass::SUBMARINE) {
Submarine *s = (Submarine*) u;
if (s->isSubmerged())