fix diving animation prediction for clonk

And no! randomly multiplying by 2 is not a solution...
install-platforms
Maikel de Vries 2018-01-19 12:34:12 +01:00
parent dc7734e223
commit 92aba45914
2 changed files with 6 additions and 5 deletions

View File

@ -817,8 +817,8 @@ func StartJump()
//Dive jump (only if not aiming)
if(!this->~IsAiming())
{
var flight = SimFlight(AbsX(GetX()), AbsY(GetY()), GetXDir()*2, GetYDir()*2, 25); //I have no clue why the dirs must be doubled... but it seems to fix it
if(GBackLiquid(flight[0] - GetX(), flight[1] - GetY()) && GBackLiquid(flight[0] - GetX(), flight[1] + GetDefHeight() / 2 - GetY()))
var flight = SimFlight(0, GetBottom(), nil, nil, C4M_Liquid);
if (GBackLiquid(flight[0] - GetX(), flight[1] - GetY()) && GBackLiquid(flight[0] - GetX(), flight[1] + GetBottom() - GetY()))
{
PlayAnimation("JumpDive", CLONK_ANIM_SLOT_Movement, Anim_Linear(0, 0, GetAnimationLength("JumpDive"), 60, ANIM_Hold), Anim_Linear(0, 0, 1000, 5, ANIM_Remove));
if(!GetEffect("IntDiveJump", this))

View File

@ -636,8 +636,6 @@ public func ControlJumpExecute(int ydir)
if (GetProcedure() == "SCALE" || GetAction() == "Climb")
{
AddEffect("WallKick", this, 1);
SetAction("Jump");
var xdir;
if(GetDir() == DIR_Right)
{
@ -652,13 +650,16 @@ public func ControlJumpExecute(int ydir)
SetYDir(-ydir * GetCon(), 100 * 100);
SetXDir(xdir * 17);
// Set speed first to have proper animations when jump starts.
SetAction("Jump");
return true;
}
//Normal jump
else
{
SetAction("Jump");
SetYDir(-ydir * GetCon(), 100 * 100);
// Set speed first to have proper animations when jump starts.
SetAction("Jump");
return true;
}
}