public override CmdResult ExecuteRequest(CmdRequest args) { int argsUsed; var keyargs = args.GetProperty("targets"); ICollection <SimObject> objs = WorldSystem.GetPrimitives(keyargs, out argsUsed); bool rightNow = true; if (argsUsed == 0) { objs = (ICollection <SimObject>)WorldSystem.GetAllSimObjects(); rightNow = false; } WriteLine("Meshing " + objs.Count); foreach (SimObject o2 in objs) { SimObjectPathFinding o = o2.PathFinding; o.IsWorthMeshing = true; if (rightNow) { o.AddCollisionsNow(); } else { o.AddCollisions(); } } if (rightNow) { SimRegion.BakeRegions(); } else { Cogbot.WorldPathSystem.MeshingQueue.Enqueue(SimRegion.BakeRegions); } return(TheBotClient.ExecuteCommand("meshinfo", args.CallerAgent, args.Output, args.CmdFlags)); }