From 21c1fd36600dfb3edccbbf8df1075243002b2b90 Mon Sep 17 00:00:00 2001 From: Mittendrein Markus Date: Thu, 3 Mar 2016 14:56:13 +0100 Subject: Iceball explodes if the clonk is aiming longer than 180 frames --- TemplePushing.c4s/System.c4g/IceBall.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) (limited to 'TemplePushing.c4s/System.c4g') diff --git a/TemplePushing.c4s/System.c4g/IceBall.c b/TemplePushing.c4s/System.c4g/IceBall.c index c9b67ab..ba11967 100644 --- a/TemplePushing.c4s/System.c4g/IceBall.c +++ b/TemplePushing.c4s/System.c4g/IceBall.c @@ -1,6 +1,6 @@ /*-- Iceball --*/ -#strict +#strict 2 #appendto ICEB @@ -42,11 +42,23 @@ func FxIceStrikeFlightTimer(pTarget, iEffectNumber, iEffectTime) // Ausrichtung nach Caster if (!iLaunchFree && pCaster) { - var x=GetX(pCaster)+Sin(iAngle, 25), y=GetY(pCaster)-Cos(iAngle, 25); - if (GetX()!=x || GetY()!=y) + if(iEffectTime > 180) { - DrawParticleLine("Snow", x-GetX(), y-GetY(), 0, 0, 5, 40, 16777215, 16777215, 0); - SetPosition(x, y); + var aimer = LocalN("pAimer", pCaster) || LocalN("pAimer", LocalN("pAimingClonk", pCaster)); + if(aimer) + { + aimer->ControlThrow(); + } + return Hit(); + } + else + { + var x=GetX(pCaster)+Sin(iAngle, 25), y=GetY(pCaster)-Cos(iAngle, 25); + if (GetX()!=x || GetY()!=y) + { + DrawParticleLine("Snow", x-GetX(), y-GetY(), 0, 0, 5, 40, 16777215, 16777215, 0); + SetPosition(x, y); + } } } -- cgit v1.2.3-54-g00ecf