Skip to content

Commit c82b851

Browse files
committed
small bullet target fix & add getRandomSeed to Game
1 parent 35734be commit c82b851

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/main/java/bwapi/Bullet.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public Unit getTarget() {
5454
}
5555

5656
public Position getTargetPosition() {
57-
return new Position(bulletData.positionX(), bulletData.positionY());
57+
return new Position(bulletData.targetPositionX(), bulletData.targetPositionY());
5858
}
5959

6060
public int getRemoveTimer() {

src/main/java/bwapi/Game.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -957,4 +957,9 @@ public boolean setRevealAll(boolean reveal) {
957957
958958
public int getDamageTo(UnitType toType, UnitType fromType, Player toPlayer, Player fromPlayer);
959959
*/
960+
961+
//Since 4.2.0
962+
public int getRandomSeed() {
963+
return gameData.randomSeed();
964+
}
960965
}

0 commit comments

Comments
 (0)