Fix of jump arcs hopefully

This commit is contained in:
Azra Victor 2021-06-23 19:35:18 +02:00 committed by no
parent 2d54c76bc6
commit 23bc9aabcd
3 changed files with 8 additions and 13 deletions

View File

@ -1022,7 +1022,7 @@ public class BlueBaseFrames {
String path = "textures/Sprite_sans_grille_9comp.png";
String pathToBG = "textures/arena1.png";
Frame f = BlueNormals.ForwardDFrame0();
Frame f = BlueNormals.crouchCFrame2();
ObjectGl blue = new ObjectGl(0f, 138f, 138f, 5f, path, null);

View File

@ -232,15 +232,10 @@ public class Frame {
* @param f the frame to clone
*/
public void cloneWithoutMovement(Frame f) {
this.cloneArray(f); //Il faut cloner individuellement chaque hitbox des differentes listes pour ne pas garder les pointeurs
Push_HitBox phb = f.getPushHitBox();
this.setPushHitBox(new Push_HitBox(phb.getPosX(), phb.getPosY(), phb.getSize_x(), phb.getSize_y()));
this.normalCancellable = f.isNormalCancellable();
this.specialCancellable = f.isSpecialCancellable();
this.jumpCancellable = f.jumpCancellable;
this.moveCancellable = f.isMoveCancellable();
this.isDashCancellable = f.isDashCancellable;
this.lastFrameOfHit = f.islastFrameOfHit();
this.setSpriteWrap(f.sprite[0], f.sprite[1], f.sprite[2], f.sprite[3]);
double moveX = this.move_x;
double moveY = this.move_y;
this.clone(f);
this.setMove_x(moveX);
this.setMove_y(moveY);
}
}

View File

@ -88,14 +88,14 @@ public class nextFrameBuffer {
nextFrameBuffer fb = new nextFrameBuffer();
fb.clone(this);
this.emptyQueue();
try{fb.goToNext();} catch(IndexOutOfBoundsException e) {goOn = false;}
try{fb.goToNext();} catch(NullPointerException e) {goOn = false;}
while(goOn && i < f.size()) {
try{
fb.current.cloneWithoutMovement(f.get(i));
this.addFrameToQueue(fb.current);
fb.goToNext();
i++;
} catch(IndexOutOfBoundsException e) { goOn = false;}
} catch(NullPointerException e) { goOn = false;}
}
}