forked from Mirrors/openclonk
Backed out changeset: 4a7d917dafba
parent
1c9435df55
commit
07c865231a
|
@ -1271,23 +1271,14 @@ func FxIntHangleStart(pTarget, iNumber, fTmp)
|
|||
// 7: Whether the HangleStand animation is shown front-facing or back-facing
|
||||
// 10: Previous Hangle physical
|
||||
|
||||
if(GetDir()) EffectVar(7, pTarget, iNumber) = 1;
|
||||
else EffectVar(7, pTarget, iNumber) = 0;
|
||||
EffectVar(1, pTarget, iNumber) = PlayAnimation("HangleStand", 5, Anim_Linear(0, 0, 2000, 100, ANIM_Loop), Anim_Linear(0, 0, 1000, 5, ANIM_Remove));
|
||||
|
||||
var begin = 4000*EffectVar(7, pTarget, iNumber);//EffectVar(7, pTarget, iNumber);
|
||||
var end = 2000+begin;
|
||||
EffectVar(1, pTarget, iNumber) = PlayAnimation("HangleStand", 5, Anim_Linear(begin, begin, end, 100, ANIM_Loop), Anim_Linear(0, 0, 1000, 5, ANIM_Remove));
|
||||
// EffectVar(1, pTarget, iNumber) = PlayAnimation("HangleStand", 5, Anim_Linear(0, 0, 2000, 100, ANIM_Loop), Anim_Linear(0, 0, 1000, 5, ANIM_Remove));
|
||||
}
|
||||
|
||||
func FxIntHangleStop(pTarget, iNumber, iReasonm, fTmp)
|
||||
{
|
||||
SetPhysical("Hangle", EffectVar(10, pTarget, iNumber), 2);
|
||||
if(fTmp) return;
|
||||
if(GetDir() == 1)
|
||||
EffectVar(7, pTarget, iNumber) = 1;
|
||||
else
|
||||
EffectVar(7, pTarget, iNumber) = 0;
|
||||
}
|
||||
|
||||
func FxIntHangleTimer(pTarget, iNumber, iTime)
|
||||
|
@ -1310,7 +1301,7 @@ func FxIntHangleTimer(pTarget, iNumber, iTime)
|
|||
SetAnimationPosition(EffectVar(1, pTarget, iNumber), Anim_Const(position % GetAnimationLength("Hangle")));
|
||||
|
||||
// Continue movement, if the clonk still has momentum
|
||||
if((GetComDir() == COMD_Stop || GetComDir() == COMD_Up) && iSpeed>10)
|
||||
if(GetComDir() == COMD_Stop && iSpeed>10)
|
||||
{
|
||||
// Make it stop after the current movement
|
||||
EffectVar(6, pTarget, iNumber) = 1;
|
||||
|
@ -1321,7 +1312,7 @@ func FxIntHangleTimer(pTarget, iNumber, iTime)
|
|||
SetComDir(COMD_Left);
|
||||
}
|
||||
// Stop movement if the clonk has lost his momentum
|
||||
else if(iSpeed <= 10 && (GetComDir() == COMD_Stop || GetComDir() == COMD_Up || EffectVar(6, pTarget, iNumber)))
|
||||
else if(iSpeed <= 10 && (GetComDir() == COMD_Stop || EffectVar(6, pTarget, iNumber)))
|
||||
{
|
||||
EffectVar(6, pTarget, iNumber) = 0;
|
||||
SetComDir(COMD_Stop);
|
||||
|
@ -1342,7 +1333,7 @@ func FxIntHangleTimer(pTarget, iNumber, iTime)
|
|||
else
|
||||
{
|
||||
// We are currently not moving
|
||||
if(GetComDir() != COMD_Stop && GetComDir() != COMD_Up)
|
||||
if(GetComDir() != COMD_Stop)
|
||||
{
|
||||
// Switch to move
|
||||
EffectVar(0, pTarget, iNumber) = 1;
|
||||
|
|
|
@ -3636,9 +3636,9 @@ void C4Object::ContactAction()
|
|||
{
|
||||
if (pPhysical->CanHangle)
|
||||
{
|
||||
// iDir=DIR_Left;
|
||||
// if (Action.Dir==DIR_Left) { iDir=DIR_Right; }
|
||||
ObjectActionHangle(this,Action.Dir); return;
|
||||
iDir=DIR_Left;
|
||||
if (Action.Dir==DIR_Left) { iDir=DIR_Right; }
|
||||
ObjectActionHangle(this,iDir); return;
|
||||
}
|
||||
else
|
||||
Action.ComDir=COMD_Stop;
|
||||
|
@ -4112,10 +4112,10 @@ void C4Object::ExecAction()
|
|||
xdir+=ScaleAccel; if (xdir>+lLimit) xdir=+lLimit;
|
||||
break;
|
||||
case COMD_Up:
|
||||
/* xdir += (Action.Dir == DIR_Left) ? -ScaleAccel : ScaleAccel;
|
||||
xdir += (Action.Dir == DIR_Left) ? -ScaleAccel : ScaleAccel;
|
||||
if (xdir<-lLimit) xdir=-lLimit;
|
||||
if (xdir>+lLimit) xdir=+lLimit;
|
||||
break;*/ // Hangle + Up means now stop. Stops now the clonk when jumping to the ceiling
|
||||
break;
|
||||
case COMD_Stop: case COMD_Down:
|
||||
if (xdir<0) xdir+=ScaleAccel;
|
||||
if (xdir>0) xdir-=ScaleAccel;
|
||||
|
|
Loading…
Reference in New Issue