- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
int turn = m_mapObject->getTurnSpeed();
//НЕ НАДО ТУТ ОПТИМИЗИРОВАТЬ /= 45 !!!!
if (turn != 0) {
if (turn > 0) {
// qDebug() << "Turn plus";
turn /= 45;
if (turn < 4) turn = 4;
if (turn > 8) turn = 8;
} else {
// qDebug() << "Turn minus";
turn /= 45;
if (turn > -4) turn = -4;
if (turn < -8) turn = -8;
}
paint.drawLine(QPoint(0,-speed),QPoint(turn,-speed));
}