Subversion Repositories QTron

Compare Revisions

Ignore whitespace Rev 9 → Rev 13

/mainwindow.cpp
53,7 → 53,6
{
bikes[i]->hasHadGo = false;
bikes[i]->run(bikes);
bikes[i]->draw(&painter);
}
}
Bike *bike;
63,6 → 62,14
{
}
}
 
for (int i = 0; i < bikes.count(); i++)
{
if (bikes[i]->show)
{
bikes[i]->draw(&painter);
}
}
}
 
checkClients();
/bike.cpp
107,7 → 107,7
Bike *bike = bikes[i];
if (bike->isReady && bike->show)
{
if (bike->dead)
if (bike->dead || bike->collided)
{
socket->write("DEAD ");
socket->write(bike->name.toAscii());
183,7 → 183,7
return true;
for(int j = 0; j < linePoints.count() - 2; j++)
{
if(!(linePoints[j].x == linePoints[j+1].x() && linePoints[i].x() == linePoints[i-1].x()) && !(linePoints[j].y() == linePoints[j+1].y() && linePoints[i].y == linePoints[i-1].y()))
if(!(linePoints[j].x() == linePoints[j+1].x() && linePoints[i].x() == linePoints[i-1].x()) && !(linePoints[j].y() == linePoints[j+1].y() && linePoints[i].y() == linePoints[i-1].y()))
{
// If not parallel
if(linePoints[j].x() == linePoints[j+1].x())