mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2025-01-18 23:46:28 +01:00
Fix glitchy freeze scoreboards (negative scores)
This commit is contained in:
parent
2cb33a5ec6
commit
fbdf56f22f
@ -29,6 +29,9 @@ public class GamePlayer {
|
||||
public synchronized void addScore(int amount) {
|
||||
if (habbo.getHabboInfo().getGamePlayer() != null && this.habbo.getHabboInfo().getCurrentGame() != null && this.habbo.getHabboInfo().getCurrentRoom().getGame(this.habbo.getHabboInfo().getCurrentGame()).getTeamForHabbo(this.habbo) != null) {
|
||||
this.score += amount;
|
||||
|
||||
if (this.score < 0) this.score = 0;
|
||||
|
||||
WiredHandler.handle(WiredTriggerType.SCORE_ACHIEVED, this.habbo.getRoomUnit(), this.habbo.getHabboInfo().getCurrentRoom(), new Object[]{this.habbo.getHabboInfo().getCurrentRoom().getGame(this.habbo.getHabboInfo().getCurrentGame()).getTeamForHabbo(this.habbo).getTotalScore(), amount});
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user