diff --git a/activeGameState.cpp b/activeGameState.cpp index ac6e858..719503a 100755 --- a/activeGameState.cpp +++ b/activeGameState.cpp @@ -501,6 +501,8 @@ namespace battleship{ vector selUnits = mainPlayer->getSelectedUnits(); for (Unit *u : units) { + if(u->isVehicle() && ((Vehicle*)u)->getGarrisonable()) continue; + Node *model = u->getModel(); if (u->getPlayer()->getTeam() == mainPlayer->getTeam()){ diff --git a/map.cpp b/map.cpp index f69dc36..980d6fc 100755 --- a/map.cpp +++ b/map.cpp @@ -13,6 +13,7 @@ #include "map.h" #include "util.h" +#include "vehicle.h" #include "game.h" #include "player.h" #include "gameObject.h" @@ -102,6 +103,7 @@ namespace battleship{ return node; } + //TODO add a flag to Player::getUnits* whether to include garrisoned units void Map::Minimap::updateImage(){ GameManager *gm = GameManager::getSingleton(); Map *map = Map::getSingleton(); @@ -120,6 +122,8 @@ namespace battleship{ vector units = pl->getUnits(); for(Unit *u : units){ + if(u->isVehicle() && ((Vehicle*)u)->getGarrisonable()) continue; + Vector2 coords = Vector2( int(u->getPos().x / mapSize.x * width), int(-u->getPos().z / mapSize.z * height)