Skip to content

Commit

Permalink
尝试修复血条显示不同步问题
Browse files Browse the repository at this point in the history
  • Loading branch information
lt-name committed Nov 12, 2023
1 parent 25c9d72 commit 60e6fe6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/main/java/cn/lanink/gunwar/room/base/BaseRoom.java
Original file line number Diff line number Diff line change
Expand Up @@ -870,7 +870,7 @@ public void playerRespawn(Player player) {

Tools.rePlayerState(player, true);
Tools.showPlayer(this, player);
playerGameData.setHealth(20F);
playerGameData.setHealth(this.gunWar.isEnableAloneHealth() ? 20F : player.getMaxHealth());

if (this.getSupplyType() != SupplyType.CLOSE) {
player.getInventory().addItem(Tools.getItem(13)); //打开商店物品
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,11 @@ public void onRun(int i) {
break;
}
default:
float health;
float health = room.getPlayerHealth(entry.getKey());
int maxHealth;
if (this.owner.isEnableAloneHealth()) {
health = this.room.getPlayerHealth(entry.getKey());
maxHealth = 20;
}else {
health = entry.getKey().getHealth();
maxHealth = entry.getKey().getMaxHealth();
}
bossBar.setText(this.language.translateString("gameTimeBoosBar",
Expand Down

0 comments on commit 60e6fe6

Please sign in to comment.