From 71960756d1e742889664b15d0e430b9e19f5a6d1 Mon Sep 17 00:00:00 2001 From: MrZ_26 Date: Tue, 28 Jul 2020 01:36:35 +0800 Subject: [PATCH] =?UTF-8?q?CC=E5=88=B7=E6=96=B0=E5=9C=BA=E5=9C=B0=E7=BB=86?= =?UTF-8?q?=E8=8A=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/ai.lua | 4 ---- parts/player.lua | 7 +++---- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/parts/ai.lua b/parts/ai.lua index d279f7dc..5360ebbb 100644 --- a/parts/ai.lua +++ b/parts/ai.lua @@ -271,10 +271,6 @@ return{ }, ["CC"]={ function(P) - if P.AI_needFresh then - CC_updateField(P) - P.AI_needFresh=false - end BOT.think(P.AI_bot) return 2 end,--start thinking diff --git a/parts/player.lua b/parts/player.lua index ad743f90..3e5464c8 100644 --- a/parts/player.lua +++ b/parts/player.lua @@ -419,7 +419,7 @@ local function Pupdate_alive(P,dt) if P.y_img~=P.curY then P.dropDelay=P.gameEnv.drop elseif P.AI_mode=="CC"then - P.AI_needFresh=true + CC_updateField(P) if not P.AIdata._20G and P.gameEnv.drop=0 then goto stop end P:drop() if P.AI_mode=="CC"then - P.AI_needFresh=true + CC_updateField(P) end end end @@ -1991,7 +1991,7 @@ function player.lose(P) P.field[_],P.visTime[_]=nil end if P.AI_mode=="CC"then - P.AI_needFresh=true + CC_updateField(P) end P.life=P.life-1 return @@ -2480,7 +2480,6 @@ local function loadAI(P,AIdata)--load AI params local ENV=P.gameEnv P.AI_mode=AIdata.type P.AI_stage=1 - P.AI_needFresh=false P.AI_keys={} P.AI_delay=AIdata.delay or min(int(ENV.drop*.8),2*AIdata.delta) P.AI_delay0=AIdata.delta