autocontrol

This commit is contained in:
unknown
2010-08-30 11:03:21 +04:00
parent 183d1a45b9
commit 13f8040f4e
9 changed files with 392 additions and 274 deletions

View File

@@ -85,6 +85,7 @@ void Aliens::update()
}
if (curMiss < 0)
{
// TODO: smooth rotate (how???)
arctg = std::atan2((*i).pos.x() - (*i).path.at((*i).pathIndex).x(),(*i).pos.y() - (*i).path.at((*i).pathIndex).y());
//if (tmpdy < 0) arctg=arctg+M_PI;
angl = 180.0f*(-arctg)/M_PI;