Skip to content
Permalink
Browse files

fix not scaling with holding loaded musket (#1711)

  • Loading branch information...
MDT-Maikel committed Apr 7, 2016
1 parent 83f3efb commit 13f0f584e8e0adb62e28026829963ccb9f015590
@@ -17,10 +17,10 @@ func Hit()
Sound("Hits::GeneralHit?");
}

local fAiming;
local is_aiming;

public func GetCarryMode(clonk) { if(fAiming >= 0) return CARRY_Musket; }
public func GetCarrySpecial(clonk) { if(fAiming > 0) return "pos_hand2"; }
public func GetCarryMode(clonk) { return CARRY_Musket; }
public func GetCarrySpecial(clonk) { if (is_aiming) return "pos_hand2"; }
public func GetCarryBone() { return "main"; }
public func GetCarryTransform()
{
@@ -38,6 +38,7 @@ func Initialize()
MuzzleOffset = -8;

loaded = false;
is_aiming = false;

animation_set = {
AimMode = AIM_Position, // The aiming animation is done by adjusting the animation position to fit the angle
@@ -90,8 +91,7 @@ func ControlUseStart(object clonk, int x, int y)
return true;
}

fAiming = 1;

is_aiming = true;
holding = true;

// reload weapon if not loaded yet
@@ -159,7 +159,7 @@ protected func ControlUseCancel(object clonk, int x, int y)

public func Reset(clonk)
{
fAiming = 0;
is_aiming = false;
}

private func FireWeapon(object clonk, int angle)
@@ -14,10 +14,10 @@ func Hit()
Sound("Hits::GeneralHit?");
}

local fAiming;
local is_aiming;

public func GetCarryMode(clonk) { if(fAiming >= 0) return CARRY_Musket; }
public func GetCarrySpecial(clonk) { if(fAiming > 0) return "pos_hand2"; }
public func GetCarryMode(clonk) { return CARRY_Musket; }
public func GetCarrySpecial(clonk) { if (is_aiming) return "pos_hand2"; }
public func GetCarryBone() { return "main"; }
public func GetCarryTransform()
{
@@ -35,6 +35,7 @@ func Initialize()
MuskOffset = -8;

loaded = false;
is_aiming = false;

animation_set = {
AimMode = AIM_Position, // The aiming animation is done by adjusting the animation position to fit the angle
@@ -88,7 +89,7 @@ func ControlUseStart(object clonk, int x, int y)
return true;
}

fAiming = 1;
is_aiming = true;

holding = true;

@@ -125,7 +126,7 @@ protected func ControlUseStop(object clonk, ix, iy)
{
holding = false;
clonk->StopAim();
return -1;
return true;
}

// Callback from the clonk, when he actually has stopped aiming
@@ -148,7 +149,7 @@ protected func ControlUseCancel(object clonk, int x, int y)

public func Reset(clonk)
{
fAiming = 0;
is_aiming = false;
}

private func FireWeapon(object clonk, int angle)

0 comments on commit 13f0f58

Please sign in to comment.
You can’t perform that action at this time.