Skip to content

Commit

Permalink
more general gps search
Browse files Browse the repository at this point in the history
  • Loading branch information
Dregu committed Mar 2, 2021
1 parent e6e8f87 commit ac57f59
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions examples/gps.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ac57f59

Please sign in to comment.