From b4434b1981860e9412fb25239d612960008bb81c Mon Sep 17 00:00:00 2001 From: Mittendrein Markus Date: Wed, 10 Feb 2016 14:22:21 +0100 Subject: Rework QueryCatchBlow --- TemplePushing.c4s/System.c4g/ShootInventory.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'TemplePushing.c4s/System.c4g/ShootInventory.c') diff --git a/TemplePushing.c4s/System.c4g/ShootInventory.c b/TemplePushing.c4s/System.c4g/ShootInventory.c index b0260b5..dd4ce1f 100644 --- a/TemplePushing.c4s/System.c4g/ShootInventory.c +++ b/TemplePushing.c4s/System.c4g/ShootInventory.c @@ -13,6 +13,8 @@ #appendto TSWB #appendto METO +local shotFrame, shooter; + protected func Activate(object clonk) { [$Shoot$|Image=GNPW] @@ -86,6 +88,14 @@ protected func Activate(object clonk) SetYDir(-15); SetXDir(-80 + 160 * clonk->GetDir()); } + + shotFrame = FrameCounter(); + shooter = clonk; return 1; -} \ No newline at end of file +} + +func QueryOwnCatchBlow(object target) +{ + return target == shooter && FrameCounter() - shotFrame < 3; +} -- cgit v1.2.3-54-g00ecf