shield usage now stopped if the clonk isn't still walking or jumping (#369)

Richard Gerum 2010-10-08 13:53:35 +02:00
parent f1d09f266b
commit 30f6c06d59
1 changed files with 4 additions and 0 deletions

View File

@ -91,6 +91,8 @@ func AdjustSolidMaskHelper()
func ControlUseHolding(clonk, x, y)
{
if(!clonk->IsWalking() && !clonk->IsJumping())
return clonk->CancelUse();
var angle=Angle(0,0, x,y);
clonk->SetAnimationPosition(aim_anim, Anim_Const(Abs(Normalize(angle,-180)) * 11111/1000));
if(clonk->GetDir() == DIR_Left)
@ -123,6 +125,8 @@ func ControlUseCancel(object clonk, int ix, int iy)
clonk->StopAnimation(clonk->GetRootAnimation(10));
clonk->UpdateAttach();
AdjustSolidMaskHelper();
if(GetEffect("ShieldStopControl", clonk))
RemoveEffect("ShieldStopControl", clonk);
}
func Departure()