From 35c7935f9c0a10a77ef6d595fc3238b4bdc6c1b7 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Thu, 20 May 2021 15:48:28 +0800 Subject: [PATCH] =?UTF-8?q?spike=E6=8C=87=E7=A4=BA=E5=99=A8=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/player/draw.lua | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/parts/player/draw.lua b/parts/player/draw.lua index 6caf72ee..32785516 100644 --- a/parts/player/draw.lua +++ b/parts/player/draw.lua @@ -680,10 +680,16 @@ function draw.norm(P) end --Spike - if ENV.showSpike and P.spikeTime>0 and P.spike>=10 then - local gb=10/P.spike - gc_setColor(1,gb,gb,min(P.spikeTime/30,.8)) - mDraw(P.spikeText,150,100,nil,min(.3+(P.spike/26)*.4+P.spikeTime/100*.3,1)) + local spt=P.spikeTime + if ENV.showSpike and spt>0 and P.spike>=10 then + local rg=10/P.spike + 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) + end + mDraw(P.spikeText,x,y,nil,min(.3+(P.spike/26)*.4+spt/100*.3,1)) end --Bonus texts