Solve the position problem #76

Merged
tonitch merged 1 commits from ParserPositionFloatingBug into master 2023-05-19 00:32:27 +02:00

View File

@ -114,7 +114,8 @@ public class BinaryParser implements FileParser {
ret[piece_index] = new Piece(_piece_matrix);
if(saved_data){
Vec2 _piece_pos = new Vec2(pieces_positions[piece_index*2], pieces_positions[piece_index*2 + 1]);
Vec2 _piece_pos = (pieces_positions[piece_index*2] == 70 && pieces_positions[piece_index*2+1] == 76) ?
null : new Vec2(pieces_positions[piece_index*2], pieces_positions[piece_index*2 + 1]);
ret[piece_index].setPosition(_piece_pos);
}