Wouldn't it work to quickly calculate how much the teleporter removes from the distance and if it's less then walking to the destination regularly send the glob to the teleporter and if it's more have them walk regularly?
On Tue, 2007-02-06 at 22:09 +0100, Leo Wandersleb wrote: > Stéphane Magnenat wrote: > > I'm not sure this will work without tweaking the gradients. Imagine you > > want > > to build an expansion in an area with no wheat. You build a teleporter at > > near wheat and in this expansion. You want workers to use the teleporter. > > If > > the wheat gradient does not take teleporter into account there is no way > > pathfinding can use it, as pathfinding, excepting for local glob > > avoidances, > > use gradients. > > pathfinding has to be tweaked. globs will not only ask for wheat gradient but > also for teleporter's wheat level and gradient. > to ease teleporter use i would do pathfinding like: > if(wheat_gradient > 240) > use old algo > else > if(teleporter_gradient && teleporters_wheat_level > walk the teleporters gradient > > Leo > > > _______________________________________________ > glob2-devel mailing list > [email protected] > http://lists.nongnu.org/mailman/listinfo/glob2-devel -- Do not be afraid to joust a giant just because some people insist on believing in windmills. _______________________________________________ glob2-devel mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/glob2-devel
