From ac57f5991cd7de457d949721781b124a0bd57514 Mon Sep 17 00:00:00 2001 From: Dregu Date: Tue, 2 Mar 2021 20:56:39 +0200 Subject: [PATCH] more general gps search --- examples/gps.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/examples/gps.lua b/examples/gps.lua index 68e49fa3a..e708e9350 100644 --- a/examples/gps.lua +++ b/examples/gps.lua @@ -252,8 +252,7 @@ function recalculate() tx = math.floor(x - xmin + 1) ty = math.floor(ymin - y + 1) cost = 200 - type = ent.type.id - if type == ENT_TYPE.FLOOR_PIPE or type == ENT_TYPE.ACTIVEFLOOR_FALLING_PLATFORM or type == ENT_TYPE.ACTIVEFLOOR_PUSHBLOCK or type == ENT_TYPE.ACTIVEFLOOR_ELEVATOR or type == ENT_TYPE.ACTIVEFLOOR_REGENERATINGBLOCK or type == ENT_TYPE.ACTIVEFLOOR_BONEBLOCK then + if ent.type.id == ENT_TYPE.FLOOR_PIPE or ent.type.search_flags == 0x80 then cost = 5 end if tx >= 1 and tx <= #board[1] and ty >= 1 and ty <= #board then