public void DumpLos(string cmd, string[] cmdsplit, int player) { logfile.WriteLine("calling getlosmap..."); bool[] LosMap = aicallback.GetLosMap(); logfile.WriteLine("...done"); int loswidth = aicallback.GetMapWidth() / 2; int losheight = aicallback.GetMapHeight() / 2; logfile.WriteLine("losmap width: " + loswidth + " losheight: " + losheight); ArrayIndexer arrayindexer = new ArrayIndexer(loswidth, losheight); for (int y = 0; y < losheight; y++) { string line = ""; for (int x = 0; x < loswidth; x++) { if (LosMap[arrayindexer.GetIndex(x, y)]) { line += "*"; // aicallback.DrawUnit( "ARMCOM", new Float3( x * 16, 0, y * 16 ), 0.0f, 100, aicallback.GetMyAllyTeam(), true, true); } else { line += "-"; } } logfile.WriteLine(line); } aicallback.SendTextMsg("los dumped to logfile", 0); }