correction of a small error in the updating of the position of the sprites.
This commit is contained in:
parent
ddaf700b55
commit
0fc5db4f58
@ -224,13 +224,12 @@ public class match {
|
||||
}
|
||||
nextFrame(p1,inputsP1);
|
||||
nextFrame(p2,inputsP2);
|
||||
updatePos(p1,p1.getPosX()< p2.getPosX());
|
||||
updatePos(p2,!(p1.getPosX()< p2.getPosX()));
|
||||
f = p2.getCurrentframe();
|
||||
objP2.setTextureWrap(f.getSprite()[0], f.getSprite()[1], f.getSprite()[2], f.getSprite()[3]);
|
||||
objP2.translate(new Vector3f(p2.getPosX()-oldPosXp2,p2.getPosY()-oldPosYp2,0));
|
||||
|
||||
boolean p1LooksRight = p1.getPosX() < p2.getPosX();
|
||||
updatePos(p1,p1LooksRight);
|
||||
updatePos(p2,!p1LooksRight);
|
||||
|
||||
|
||||
if(p1LooksRight) {
|
||||
|
||||
f = p1.getCurrentframe();
|
||||
|
Loading…
x
Reference in New Issue
Block a user