From 84357152eb089be4ddddfa5a174974b35e4c719c Mon Sep 17 00:00:00 2001 From: helixhorned Date: Fri, 8 Nov 2013 18:08:40 +0000 Subject: [PATCH] Lunatic: fix ported A_FurthestVisiblePoint(). git-svn-id: https://svn.eduke32.com/eduke32@4141 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/lunatic/control.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/polymer/eduke32/source/lunatic/control.lua b/polymer/eduke32/source/lunatic/control.lua index 13f23301e..0f2f38129 100644 --- a/polymer/eduke32/source/lunatic/control.lua +++ b/polymer/eduke32/source/lunatic/control.lua @@ -1358,17 +1358,19 @@ local function A_FurthestVisiblePoint(aci, otherspr) return end + -- TODO_MP local angincs = (ffiC.ud.player_skill < 3) and 1024 or 2048/(1+krandand(1)) + local spr = sprite[aci] local j = 0 repeat local ray = kangvec(otherspr.ang + j, 16384-krandand(32767)) local hit = hitscan(otherspr^(16*256), otherspr.sectnum, ray, ffiC.CLIPMASK1) local dother = manhatdist(hit.pos, otherspr) - local dactor = manhatdist(hit.pos, sprite[aci]) + local dactor = manhatdist(hit.pos, spr) if (dother < dactor and hit.sector >= 0) then - if (cansee(hit.pos, hit.sector, otherspr^(16*256), otherspr.sectnum)) then + if (cansee(hit.pos, hit.sector, spr^(16*256), spr.sectnum)) then return hit end end