Mercurial > projects > openmelee
diff ai/ai.d @ 21:cad384ad349e
avoid
author | zzzzrrr <mason.green@gmail.com> |
---|---|
date | Thu, 26 Mar 2009 07:02:56 -0400 |
parents | 6efd0830715b |
children | 4fce5596d1f6 |
line wrap: on
line diff
--- a/ai/ai.d Wed Mar 25 15:25:25 2009 -0400 +++ b/ai/ai.d Thu Mar 26 07:02:56 2009 -0400 @@ -59,11 +59,13 @@ // Elementary steering AI steer.update(); //st = steer.steerToAvoidObstacles(0.25, m_world.bodyList); + st = steer.avoid(maxPredictionTime, m_world.bodyList); if(st == bzVec2.zeroVect) { st = steer.steerForPursuit(enemy.state, maxPredictionTime); chase(enemy); } else { + Stdout(st.x)(",")(st.y).newline; avoid(); } @@ -114,12 +116,10 @@ } else { ship.turnLeft(); } - - ship.state.turn = true; - - if(abs(angle) < PI/4) { + + //if(abs(angle) < PI/4) { ship.thrust(); - } + //} } }