@SUCCESSOR
Very well, I shall elaborate.
Code:
void Dodge(ffc this, npc ghost)
{
Ghost_Data=GetComboOffset(this, DARKLINK_CMB_DODGE);
float linkangle=ArcTan(DLCenterX()-CenterLinkX(),DLCenterY()-CenterLinkY());
Ghost_Jump=2.8;
Game->PlaySound(ghost->Attributes[DARKLINK_ATTR_SFX_JUMP]);
while(Ghost_Z>0 || Ghost_Jump>0)
{
Ghost_MoveAtAngle(linkangle,DARKLINK_JUMP_STEP*(ghost->Step/100),3);
Ghost_ForceDir(OppositeDir(RadianAngleDir4(linkangle)));
//Missing a waitframe.
}
}
void Jump(ffc this, npc ghost)
{
int dir=JumpDirection();
if(dir==-1)
{
Dodge(this,ghost); //this happens vary rarely
return;
}
Ghost_Jump=DARKLINK_JUMP_VELOCITY;
Game->PlaySound(ghost->Attributes[DARKLINK_ATTR_SFX_JUMP]);
while(Ghost_Z>0 || Ghost_Jump>0)
{
Ghost_Move(dir,DARKLINK_JUMP_STEP*(ghost->Step/100),3);
Ghost_ForceDir(OppositeDir(dir));
//Missing a waitframe.
}
}
This caused an infinite loop, more so the sword sprite was blank so it didn't appear so I was mistaken which part was causing the problem.