now is enable build and delete towers in game and improve graphic perfomance

find and correct many-many bugs
This commit is contained in:
2010-08-31 23:37:02 +04:00
parent 0e0f1cbfbb
commit 3316f3f48f
9 changed files with 299 additions and 196 deletions

View File

@@ -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;