void MoveTo(Float3 pos) { // check whether we really need to do anything or if order is roughly same as last one aicallback.DrawUnit("ARMSOLAR", pos, 0.0f, 50, aicallback.GetMyAllyTeam(), true, true); if (restartedfrompause || Float3Helper.GetSquaredDistance(pos, lasttargetpos) > (movetothreshold * movetothreshold)) { aicallback.GiveGroupOrder(groupid, new Command(Command.CMD_MOVE, pos.ToDoubleArray())); /* * foreach( DictionaryEntry de in UnitDefListByDeployedId ) * { * int deployedid = (int)de.Key; * IUnitDef unitdef = de.Value as IUnitDef; * aicallback.GiveOrder( deployedid, new Command( Command.CMD_MOVE, pos.ToDoubleArray() ) ); * } */ restartedfrompause = false; lasttargetpos = pos; } }