now is enable build and delete towers in game and improve graphic perfomance
find and correct many-many bugs
This commit is contained in:
@@ -22,11 +22,9 @@ bool Towers::addTower(int playerId, int srcId, QPoint pos)
|
||||
qCritical("ERROR out of towers range");
|
||||
return false;
|
||||
}
|
||||
QRect alrec(pos,QSize(1,1));
|
||||
QRect alrec(pos,QSize(2,2));
|
||||
for (QHash<int, AlienType>::iterator i = gameData->curAliens.begin(); i != gameData->curAliens.end(); ++i)
|
||||
{
|
||||
if (alrec.contains((*i).pos.toPoint())) return false;
|
||||
}
|
||||
TowerType tw;
|
||||
tw.src = srcId;
|
||||
tw.imgType = gameData->players.at(playerId)->srcTowers.at(srcId).imgType;
|
||||
|
||||
Reference in New Issue
Block a user