using in-built distance func (cos previous one wasnt even used lol)
This commit is contained in:
1 parent
71c82acdb1
commit
41186c1da3
1 file changed
+3
-4
@@ -1,3 +1,5 @@
|
|||||||
|
import('math','_euclidean');
|
||||||
|
|
||||||
_command() -> '
|
_command() -> '
|
||||||
ai_tracker allows to display
|
ai_tracker allows to display
|
||||||
some extra information about
|
some extra information about
|
||||||
@@ -424,12 +426,9 @@ __mark_path_element(path_element, visuals) ->
|
|||||||
__is_hostile(v, m) ->
|
__is_hostile(v, m) ->
|
||||||
(
|
(
|
||||||
mob = m~'type';
|
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) ->
|
__toggle(feature, arg) ->
|
||||||
(
|
(
|
||||||
|
|||||||
Reference in new issue
Block a user