Skip to content

Commit ae5790e

Browse files
committed
prevent backstab from being re-triggered
1 parent 84fa007 commit ae5790e

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

engine/src/main/battlecode/world/GameWorld.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -423,9 +423,11 @@ public boolean catTrapsAllowed(Team team) {
423423
}
424424

425425
public void backstab(Team backstabber) {
426-
this.isCooperation = false;
427-
this.backstabRound = this.currentRound;
428-
this.backstabber = backstabber;
426+
if (this.isCooperation){
427+
this.isCooperation = false;
428+
this.backstabRound = this.currentRound;
429+
this.backstabber = backstabber;
430+
}
429431
}
430432

431433
public boolean getWall(MapLocation loc) {

0 commit comments

Comments
 (0)