make sword work correctly with gamepad controls

Tobias Zwick 2011-01-03 21:20:01 +01:00
parent 957f865cfa
commit 867935d691
2 changed files with 2 additions and 9 deletions

View File

@ -25,7 +25,7 @@ public func IsToolProduct() { return 1; }
local magic_number;
local carry_bone;
public func ControlUseStart(object clonk, int x, int y)
public func ControlUse(object clonk, int x, int y)
{
// cooldown?
if(!CanStrikeWithWeapon(clonk)) return true;
@ -97,13 +97,6 @@ public func ControlUseStart(object clonk, int x, int y)
return true;
}
func ControlUseStop(object clonk, int x, int y)
{
//StopWeaponHitCheckEffect(clonk);
}
func OnWeaponHitCheckStop(clonk)
{
carry_bone = nil;

View File

@ -24,7 +24,7 @@ protected func AI_SwordAttack(object clonk, int x, int y, object target)
if (dx > 0 && clonk->GetDir() == DIR_Left)
clonk->SetDir(DIR_Right);
ControlUseStart(clonk, dx, dy);
ControlUse(clonk, dx, dy);
clonk->AppendCommand("Wait", nil, 20, nil, nil, nil, 20);
clonk->AppendCommand("Call", clonk, nil, nil, target, nil, "AI_MeleeAttack");