* the agent is alive or needs to be respawned, and then calls the
* runAI method. */
/*-------------------------------------------------------------------*/
public void run()
{
World world = null;
int curFrameNum = -1;
while(isConnected())
{
world = proxy.getWorld();
if(world != null && world.getFrame() != curFrameNum)
{
mapChanged = !mapName.equals(getServerInfo().getMapName());
if(mapChanged)
{
mapName = getServerInfo().getMapName();
bsp.reset();
}
curFrameNum = world.getFrame();
if(!isBotAlive())
{
if(getAction(Action.ATTACK))
pacify();