using in-built distance func (cos previous one wasnt even used lol)

This commit is contained in:
Ghoulboy78 committed 2021-02-24 12:33:50 +01:00
1 parent 71c82acdb1
commit 41186c1da3
1 file changed
+3 -4
@@ -1,3 +1,5 @@
import('math','_euclidean');
_command() -> '
ai_tracker allows to display
some extra information about
@@ -424,12 +426,9 @@ __mark_path_element(path_element, visuals) ->
__is_hostile(v, m) ->
(
mob = m~'type';
has(global_hostile_to_villager:mob) && (sqrt(reduce(pos(v)-pos(m), _a+_*_ , 0)) <= global_hostile_to_villager:mob)
has(global_hostile_to_villager:mob) && (_euclidean(pos(v)-pos(m)) <= global_hostile_to_villager:mob)
);
__distance(v1, v2) -> sqrt(reduce(v1-v2,_a+_*_ ,0));
__toggle(feature, arg) ->
(