Skip to content

Commit

Permalink
HXDDStatusBar: Fix tick
Browse files Browse the repository at this point in the history
  • Loading branch information
Lemon-King committed Aug 13, 2024
1 parent 070e343 commit 1f38376
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions resources/assets/zscript/statusbar/hxddstatusbar.zs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

class HXDDStatusBar : BaseStatusBar {
BaseStatusBar active;
String selected;
String defaultStatusBar;
Name selected;
Name defaultStatusBar;


override void Init() {
Expand All @@ -19,7 +19,9 @@ class HXDDStatusBar : BaseStatusBar {
override void Tick() {
Super.Tick();

if (self.selected == "") {
if (self.active is self.selected) {
self.active.Tick();
} else {
RefreshSelected();
}
}
Expand Down Expand Up @@ -53,15 +55,13 @@ class HXDDStatusBar : BaseStatusBar {
}
}
}
String cvarSelected = LemonUtil.CVAR_GetString("hxdd_statusbar_class", "HXDDHereticSplitStatusBar", CPlayer);
Name cvarSelected = LemonUtil.CVAR_GetString("hxdd_statusbar_class", "HXDDHereticSplitStatusBar", CPlayer);
if (cvarSelected == "default") {
self.selected = self.defaultStatusBar;
} else {
self.selected = cvarSelected;
}
if (self.active is self.selected) {
self.active.Tick();
} else {
if (!(self.active is self.selected)) {
// try creating?
BaseStatusBar sbar;
Name sBarClass = self.selected;
Expand Down

0 comments on commit 1f38376

Please sign in to comment.