From 0fa9f85a8d0da6be1e10fd1c00bc4d3a3cb43598 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Thu, 20 May 2021 20:56:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96spike=E6=8C=87=E7=A4=BA?= =?UTF-8?q?=E5=99=A8=E7=BB=98=E5=88=B6=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/player/draw.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/parts/player/draw.lua b/parts/player/draw.lua index 0acb11b7..6618f24b 100644 --- a/parts/player/draw.lua +++ b/parts/player/draw.lua @@ -686,16 +686,16 @@ function draw.norm(P) end --Spike - local spt=P.spikeTime - if ENV.showSpike and spt>0 and P.spike>=10 then - local rg=10/P.spike + local sp,spt=P.spike,P.spikeTime + if ENV.showSpike and spt>0 and sp>=10 then + local rg=10/sp gc_setColor(rg,rg,1,min(spt/30,.8)) local x,y=150,100 if spt>85 then - x=x+5*(rnd()-.5)*(spt-85)*min(P.spike/50,1) - y=y+5*(rnd()-.5)*(spt-85)*min(P.spike/50,1) + local d=2*(spt-85)*min(sp/50,1) + x,y=x+(rnd()-.5)*d,y+(rnd()-.5)*d end - mDraw(P.spikeText,x,y,nil,min(.3+(P.spike/26)*.4+spt/100*.3,1)) + mDraw(P.spikeText,x,y,nil,min(.3+(sp/26)*.4+spt/100*.3,1)) end --Bonus texts