Skip to content

Commit

Permalink
Play sound on each stroke
Browse files Browse the repository at this point in the history
Works both in single player and multiplayer for other players' strokes.
  • Loading branch information
StenAL committed Apr 28, 2023
1 parent 06f0e00 commit 1d797ed
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions client/src/main/java/agolf/game/GamePanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,7 @@ else if (args[1].equals("starttrack")) {
} else if (args[1].equals("beginstroke")) {
int playerId = Integer.parseInt(args[2]);
this.gamePlayerInfoPanel.method363(playerId, false);
this.gameContainer.soundManager.playGameMove();
this.gameCanvas.decodeCoords(playerId, false, args[3]);

} else if (args[1].equals("changescore")) {
Expand Down Expand Up @@ -397,6 +398,7 @@ protected void setBeginStroke(int playerId, int x, int y, int keycount) {
this.gamePlayerInfoPanel.method363(playerId, false);
String data = "beginstroke\t" + this.encodeCoords(x, y, keycount);
this.gameContainer.connection.writeData("game\t" + data);
this.gameContainer.soundManager.playGameMove();
}

protected void method336() {
Expand Down

0 comments on commit 1d797ed

Please sign in to comment.