Skip to content

Commit 5002031

Browse files
committed
fix updateType always updating regardless of frame
1 parent a5dfe2d commit 5002031

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>jbwapi</groupId>
88
<artifactId>jbwapi</artifactId>
9-
<version>0.4</version>
9+
<version>0.4.1</version>
1010

1111
<properties>
1212
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

src/main/java/bwapi/Unit.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4129,9 +4129,8 @@ public int hashCode() {
41294129
void updateType(final int frame) {
41304130
if (frame > lastTypeUpdate) {
41314131
lastTypeUpdate = frame;
4132-
position = new Position(unitData.getPositionX(), unitData.getPositionY());
4132+
unitType = UnitType.idToEnum[unitData.getType()];
41334133
}
4134-
unitType = UnitType.idToEnum[unitData.getType()];
41354134
}
41364135

41374136
void updatePlayer(final int frame) {

0 commit comments

Comments
 (0)