Attached Files | AppendStatusBar-0.patch [^] (3,252 bytes) 2024-10-03 16:21 [Show Content] [Hide Content]# HG changeset patch
# User Binary Code
# Date 1727972059 25200
# Thu Oct 03 09:14:19 2024 -0700
# Node ID 9a5ae26922baf4840f9f05957db01507d5e71d36
# Parent b026d28c6ce4b5d693fb6e5a9579d98187419134
Added new SBARINFO top level "AppendStatusBar" to allow for adding extra SBARINFO code onto existing custom SBARINFO definitions.
diff -r b026d28c6ce4 -r 9a5ae26922ba docs/zandronum-history.txt
--- a/docs/zandronum-history.txt Sun Sep 29 19:20:09 2024 +0000
+++ b/docs/zandronum-history.txt Thu Oct 03 09:14:19 2024 -0700
@@ -72,6 +72,7 @@
+ - Added the CVar "cl_showscoreleft", which if disabled will turn "x things left" messages on the scoreboard into "x things to win" and show the current score limit instead of how much is left to win. This only affects frags, points, and wins. [Kaminsky]
+ - Added ACS functions: "GetPlayerJoinQueuePosition" and "SkipJoinQueue", to return the player's position in the join queue and allow true spectators in the join queue to join the game outside of normal game mode rules. Modders can also take advantage of the new GAMEEVENT_JOINQUEUECHANGED EVENT script type to know when players are added or removed from the join queue. [Kaminsky]
+ - Added over a hundred new text colors recently made by Fuzzball. [Kaminsky]
++ - Added new SBARINFO top level "AppendStatusBar" to allow for adding extra SBARINFO code onto existing custom SBARINFO definitions. [Binary]
- - Fixed: clients didn't initialize a sector's friction properly in some cases due to a superfluous check that wasn't removed earlier. [Kaminsky]
- - Fixed: the server wouldn't initialize compatflags and compatflags2 properly if entered as command line parameters. [Kaminsky]
- - Fixed: serverinfo CVars entered on the command line were restored in reverse order. [Kaminsky]
diff -r b026d28c6ce4 -r 9a5ae26922ba src/g_shared/sbarinfo.cpp
--- a/src/g_shared/sbarinfo.cpp Sun Sep 29 19:20:09 2024 +0000
+++ b/src/g_shared/sbarinfo.cpp Thu Oct 03 09:14:19 2024 -0700
@@ -373,6 +373,7 @@
SBARINFO_STATUSBAR,
SBARINFO_MUGSHOT,
SBARINFO_CREATEPOPUP,
+ SBARINFO_APPENDSTATUSBAR, // [Binary] Additive SBARINFO implementation.
};
enum //Bar types
@@ -401,6 +402,7 @@
"statusbar",
"mugshot",
"createpopup",
+ "appendstatusbar", // [Binary] Additive SBARINFO implementation.
NULL
};
@@ -623,6 +625,7 @@
sc.MustGetToken(';');
break;
case SBARINFO_STATUSBAR:
+ case SBARINFO_APPENDSTATUSBAR: // [Binary] This uses the same code as the above case.
{
if(!baseSet) //If the user didn't explicitly define a base, do so now.
gameType = GAME_Any;
@@ -632,11 +635,16 @@
sc.MustGetToken(TK_Identifier);
barNum = sc.MustMatchString(StatusBars);
}
- if (this->huds[barNum] != NULL)
+ // [Binary] SBARINFO_APPENDSTATUSBAR shouldn't delete the old HUD if it exists.
+ const bool append = (sc.MustMatchString(SBarInfoTopLevel) == SBARINFO_APPENDSTATUSBAR);
+ if (!append)
{
- delete this->huds[barNum];
+ if (this->huds[barNum] != NULL)
+ {
+ delete this->huds[barNum];
+ }
+ this->huds[barNum] = new SBarInfoMainBlock(this);
}
- this->huds[barNum] = new SBarInfoMainBlock(this);
if(barNum == STBAR_AUTOMAP)
{
automapbar = true;
Zan-AppendStatusBar-0.pk3 [^] (663 bytes) 2024-10-03 16:43
AppendStatusBar-1.patch [^] (3,579 bytes) 2024-10-05 12:08 [Show Content] [Hide Content]# HG changeset patch
# User Binary Code
# Date 1728129884 25200
# Sat Oct 05 05:04:44 2024 -0700
# Node ID 4ab1b125de8dc68a9abebaabad0220c368b849fa
# Parent b026d28c6ce4b5d693fb6e5a9579d98187419134
Added new SBARINFO top level "AppendStatusBar" to allow for adding extra SBARINFO code onto existing custom SBARINFO definitions.
diff -r b026d28c6ce4 -r 4ab1b125de8d docs/zandronum-history.txt
--- a/docs/zandronum-history.txt Sun Sep 29 19:20:09 2024 +0000
+++ b/docs/zandronum-history.txt Sat Oct 05 05:04:44 2024 -0700
@@ -72,6 +72,7 @@
+ - Added the CVar "cl_showscoreleft", which if disabled will turn "x things left" messages on the scoreboard into "x things to win" and show the current score limit instead of how much is left to win. This only affects frags, points, and wins. [Kaminsky]
+ - Added ACS functions: "GetPlayerJoinQueuePosition" and "SkipJoinQueue", to return the player's position in the join queue and allow true spectators in the join queue to join the game outside of normal game mode rules. Modders can also take advantage of the new GAMEEVENT_JOINQUEUECHANGED EVENT script type to know when players are added or removed from the join queue. [Kaminsky]
+ - Added over a hundred new text colors recently made by Fuzzball. [Kaminsky]
++ - Added new SBARINFO top level "AppendStatusBar" to allow for adding extra SBARINFO code onto existing custom SBARINFO definitions. [Binary]
- - Fixed: clients didn't initialize a sector's friction properly in some cases due to a superfluous check that wasn't removed earlier. [Kaminsky]
- - Fixed: the server wouldn't initialize compatflags and compatflags2 properly if entered as command line parameters. [Kaminsky]
- - Fixed: serverinfo CVars entered on the command line were restored in reverse order. [Kaminsky]
diff -r b026d28c6ce4 -r 4ab1b125de8d src/g_shared/sbarinfo.cpp
--- a/src/g_shared/sbarinfo.cpp Sun Sep 29 19:20:09 2024 +0000
+++ b/src/g_shared/sbarinfo.cpp Sat Oct 05 05:04:44 2024 -0700
@@ -373,6 +373,7 @@
SBARINFO_STATUSBAR,
SBARINFO_MUGSHOT,
SBARINFO_CREATEPOPUP,
+ SBARINFO_APPENDSTATUSBAR, // [Binary] Additive SBARINFO implementation.
};
enum //Bar types
@@ -401,6 +402,7 @@
"statusbar",
"mugshot",
"createpopup",
+ "appendstatusbar", // [Binary] Additive SBARINFO implementation.
NULL
};
@@ -482,6 +484,11 @@
continue;
}
int baselump = -2;
+ FString SBarInfoTopLevelString;
+ if(sc.GetString(SBarInfoTopLevelString))
+ { // Store the string if the next token is a string, and revert scanner state afterwards
+ sc.UnGet();
+ }
switch(sc.MustMatchString(SBarInfoTopLevel))
{
case SBARINFO_BASE:
@@ -623,6 +630,7 @@
sc.MustGetToken(';');
break;
case SBARINFO_STATUSBAR:
+ case SBARINFO_APPENDSTATUSBAR: // [Binary] This uses the same code as the above case.
{
if(!baseSet) //If the user didn't explicitly define a base, do so now.
gameType = GAME_Any;
@@ -632,11 +640,16 @@
sc.MustGetToken(TK_Identifier);
barNum = sc.MustMatchString(StatusBars);
}
- if (this->huds[barNum] != NULL)
+ // [Binary] SBARINFO_APPENDSTATUSBAR shouldn't delete the old HUD if it exists.
+ const bool append = (SBarInfoTopLevelString.CompareNoCase("appendstatusbar") == 0);
+ if (!append)
{
- delete this->huds[barNum];
+ if (this->huds[barNum] != NULL)
+ {
+ delete this->huds[barNum];
+ }
+ this->huds[barNum] = new SBarInfoMainBlock(this);
}
- this->huds[barNum] = new SBarInfoMainBlock(this);
if(barNum == STBAR_AUTOMAP)
{
automapbar = true;
AppendStatusBar-1b.patch [^] (3,655 bytes) 2024-10-05 12:15 [Show Content] [Hide Content]# HG changeset patch
# User Binary Code
# Date 1728130514 25200
# Sat Oct 05 05:15:14 2024 -0700
# Node ID b1c873b7d18090c32484b48992f80d675770a3eb
# Parent b026d28c6ce4b5d693fb6e5a9579d98187419134
Added new SBARINFO top level "AppendStatusBar" to allow for adding extra SBARINFO code onto existing custom SBARINFO definitions.
diff -r b026d28c6ce4 -r b1c873b7d180 docs/zandronum-history.txt
--- a/docs/zandronum-history.txt Sun Sep 29 19:20:09 2024 +0000
+++ b/docs/zandronum-history.txt Sat Oct 05 05:15:14 2024 -0700
@@ -72,6 +72,7 @@
+ - Added the CVar "cl_showscoreleft", which if disabled will turn "x things left" messages on the scoreboard into "x things to win" and show the current score limit instead of how much is left to win. This only affects frags, points, and wins. [Kaminsky]
+ - Added ACS functions: "GetPlayerJoinQueuePosition" and "SkipJoinQueue", to return the player's position in the join queue and allow true spectators in the join queue to join the game outside of normal game mode rules. Modders can also take advantage of the new GAMEEVENT_JOINQUEUECHANGED EVENT script type to know when players are added or removed from the join queue. [Kaminsky]
+ - Added over a hundred new text colors recently made by Fuzzball. [Kaminsky]
++ - Added new SBARINFO top level "AppendStatusBar" to allow for adding extra SBARINFO code onto existing custom SBARINFO definitions. [Binary]
- - Fixed: clients didn't initialize a sector's friction properly in some cases due to a superfluous check that wasn't removed earlier. [Kaminsky]
- - Fixed: the server wouldn't initialize compatflags and compatflags2 properly if entered as command line parameters. [Kaminsky]
- - Fixed: serverinfo CVars entered on the command line were restored in reverse order. [Kaminsky]
diff -r b026d28c6ce4 -r b1c873b7d180 src/g_shared/sbarinfo.cpp
--- a/src/g_shared/sbarinfo.cpp Sun Sep 29 19:20:09 2024 +0000
+++ b/src/g_shared/sbarinfo.cpp Sat Oct 05 05:15:14 2024 -0700
@@ -373,6 +373,7 @@
SBARINFO_STATUSBAR,
SBARINFO_MUGSHOT,
SBARINFO_CREATEPOPUP,
+ SBARINFO_APPENDSTATUSBAR, // [Binary] Additive SBARINFO implementation.
};
enum //Bar types
@@ -401,6 +402,7 @@
"statusbar",
"mugshot",
"createpopup",
+ "appendstatusbar", // [Binary] Additive SBARINFO implementation.
NULL
};
@@ -482,6 +484,13 @@
continue;
}
int baselump = -2;
+
+ // [Binary] Store the Top Level string for SBARINFO_APPENDSTATUSBAR.
+ FString SBarInfoTopLevelString;
+ if(sc.GetString(SBarInfoTopLevelString))
+ { // Store the string if the next token is a string, and revert scanner state afterwards
+ sc.UnGet();
+ }
switch(sc.MustMatchString(SBarInfoTopLevel))
{
case SBARINFO_BASE:
@@ -623,6 +632,7 @@
sc.MustGetToken(';');
break;
case SBARINFO_STATUSBAR:
+ case SBARINFO_APPENDSTATUSBAR: // [Binary] This uses the same code as the above case.
{
if(!baseSet) //If the user didn't explicitly define a base, do so now.
gameType = GAME_Any;
@@ -632,11 +642,16 @@
sc.MustGetToken(TK_Identifier);
barNum = sc.MustMatchString(StatusBars);
}
- if (this->huds[barNum] != NULL)
+ // [Binary] SBARINFO_APPENDSTATUSBAR shouldn't delete the old HUD if it exists.
+ const bool append = (SBarInfoTopLevelString.CompareNoCase("appendstatusbar") == 0);
+ if (!append)
{
- delete this->huds[barNum];
+ if (this->huds[barNum] != NULL)
+ {
+ delete this->huds[barNum];
+ }
+ this->huds[barNum] = new SBarInfoMainBlock(this);
}
- this->huds[barNum] = new SBarInfoMainBlock(this);
if(barNum == STBAR_AUTOMAP)
{
automapbar = true;
AppendStatusBar-2.patch [^] (3,524 bytes) 2024-11-16 05:18 [Show Content] [Hide Content]# HG changeset patch
# User Binary Code
# Date 1731734293 28800
# Fri Nov 15 21:18:13 2024 -0800
# Node ID 0e3df0a5d77d8d977bd5c1d5525bc701b182ca75
# Parent 4e8342339656a2dbe6538c2276769866481c298f
Added new SBARINFO top level "AppendStatusBar" to allow for adding extra SBARINFO code onto existing custom SBARINFO definitions.
diff -r 4e8342339656 -r 0e3df0a5d77d docs/zandronum-history.txt
--- a/docs/zandronum-history.txt Sun Oct 27 17:39:14 2024 -0400
+++ b/docs/zandronum-history.txt Fri Nov 15 21:18:13 2024 -0800
@@ -72,6 +72,7 @@
+ - Added the CVar "cl_showscoreleft", which if disabled will turn "x things left" messages on the scoreboard into "x things to win" and show the current score limit instead of how much is left to win. This only affects frags, points, and wins. [Kaminsky]
+ - Added ACS functions: "GetPlayerJoinQueuePosition" and "SkipJoinQueue", to return the player's position in the join queue and allow true spectators in the join queue to join the game outside of normal game mode rules. Modders can also take advantage of the new GAMEEVENT_JOINQUEUECHANGED EVENT script type to know when players are added or removed from the join queue. [Kaminsky]
+ - Added over a hundred new text colors recently made by Fuzzball. [Kaminsky]
++ - Added new SBARINFO top level "AppendStatusBar" to allow for adding extra SBARINFO code onto existing custom SBARINFO definitions. [Binary]
- - Fixed: clients didn't initialize a sector's friction properly in some cases due to a superfluous check that wasn't removed earlier. [Kaminsky]
- - Fixed: the server wouldn't initialize compatflags and compatflags2 properly if entered as command line parameters. [Kaminsky]
- - Fixed: serverinfo CVars entered on the command line were restored in reverse order. [Kaminsky]
diff -r 4e8342339656 -r 0e3df0a5d77d src/g_shared/sbarinfo.cpp
--- a/src/g_shared/sbarinfo.cpp Sun Oct 27 17:39:14 2024 -0400
+++ b/src/g_shared/sbarinfo.cpp Fri Nov 15 21:18:13 2024 -0800
@@ -373,6 +373,7 @@
SBARINFO_STATUSBAR,
SBARINFO_MUGSHOT,
SBARINFO_CREATEPOPUP,
+ SBARINFO_APPENSTATUSBAR, // [Binary] Additive SBARINFO implementation.
};
enum //Bar types
@@ -401,6 +402,7 @@
"statusbar",
"mugshot",
"createpopup",
+ "appendstatusbar", // [Binary] Additive SBARINFO implementation.
NULL
};
@@ -482,7 +484,9 @@
continue;
}
int baselump = -2;
- switch(sc.MustMatchString(SBarInfoTopLevel))
+ // [Binary] Store the command, used for the switch statement and case SBARINFO_APPENDSTATUSBAR.
+ const int command = sc.MustMatchString(SBarInfoTopLevel);
+ switch(command)
{
case SBARINFO_BASE:
baseSet = true;
@@ -623,6 +627,7 @@
sc.MustGetToken(';');
break;
case SBARINFO_STATUSBAR:
+ case SBARINFO_APPENDSTATUSBAR: // [Binary] This uses the same code as the above case.
{
if(!baseSet) //If the user didn't explicitly define a base, do so now.
gameType = GAME_Any;
@@ -632,11 +637,15 @@
sc.MustGetToken(TK_Identifier);
barNum = sc.MustMatchString(StatusBars);
}
- if (this->huds[barNum] != NULL)
+ // [Binary] SBARINFO_APPENDSTATUSBAR shouldn't delete the old HUD if it exists.
+ if (command != SBARINFO_APPENDSTATUSBAR)
{
- delete this->huds[barNum];
+ if (this->huds[barNum] != NULL)
+ {
+ delete this->huds[barNum];
+ }
+ this->huds[barNum] = new SBarInfoMainBlock(this);
}
- this->huds[barNum] = new SBarInfoMainBlock(this);
if(barNum == STBAR_AUTOMAP)
{
automapbar = true;
AppendStatusBar-2b.patch [^] (3,671 bytes) 2024-11-18 17:55 [Show Content] [Hide Content]# HG changeset patch
# User Binary Code
# Date 1731952526 28800
# Mon Nov 18 09:55:26 2024 -0800
# Node ID 6e04c564e9c1ef8c3594922177f8a52349be47f6
# Parent 4e8342339656a2dbe6538c2276769866481c298f
Added new SBARINFO top level "AppendStatusBar" to allow for adding extra SBARINFO code onto existing custom SBARINFO definitions.
diff -r 4e8342339656 -r 6e04c564e9c1 docs/zandronum-history.txt
--- a/docs/zandronum-history.txt Sun Oct 27 17:39:14 2024 -0400
+++ b/docs/zandronum-history.txt Mon Nov 18 09:55:26 2024 -0800
@@ -72,6 +72,7 @@
+ - Added the CVar "cl_showscoreleft", which if disabled will turn "x things left" messages on the scoreboard into "x things to win" and show the current score limit instead of how much is left to win. This only affects frags, points, and wins. [Kaminsky]
+ - Added ACS functions: "GetPlayerJoinQueuePosition" and "SkipJoinQueue", to return the player's position in the join queue and allow true spectators in the join queue to join the game outside of normal game mode rules. Modders can also take advantage of the new GAMEEVENT_JOINQUEUECHANGED EVENT script type to know when players are added or removed from the join queue. [Kaminsky]
+ - Added over a hundred new text colors recently made by Fuzzball. [Kaminsky]
++ - Added new SBARINFO top level "AppendStatusBar" to allow for adding extra SBARINFO code onto existing custom SBARINFO definitions. [Binary]
- - Fixed: clients didn't initialize a sector's friction properly in some cases due to a superfluous check that wasn't removed earlier. [Kaminsky]
- - Fixed: the server wouldn't initialize compatflags and compatflags2 properly if entered as command line parameters. [Kaminsky]
- - Fixed: serverinfo CVars entered on the command line were restored in reverse order. [Kaminsky]
diff -r 4e8342339656 -r 6e04c564e9c1 src/g_shared/sbarinfo.cpp
--- a/src/g_shared/sbarinfo.cpp Sun Oct 27 17:39:14 2024 -0400
+++ b/src/g_shared/sbarinfo.cpp Mon Nov 18 09:55:26 2024 -0800
@@ -373,6 +373,7 @@
SBARINFO_STATUSBAR,
SBARINFO_MUGSHOT,
SBARINFO_CREATEPOPUP,
+ SBARINFO_APPENDSTATUSBAR, // [Binary] Additive SBARINFO implementation.
};
enum //Bar types
@@ -401,6 +402,7 @@
"statusbar",
"mugshot",
"createpopup",
+ "appendstatusbar", // [Binary] Additive SBARINFO implementation.
NULL
};
@@ -482,7 +484,9 @@
continue;
}
int baselump = -2;
- switch(sc.MustMatchString(SBarInfoTopLevel))
+ // [Binary] Store the command, used for the switch statement and case SBARINFO_APPENDSTATUSBAR.
+ const int command = sc.MustMatchString(SBarInfoTopLevel);
+ switch(command)
{
case SBARINFO_BASE:
baseSet = true;
@@ -623,6 +627,7 @@
sc.MustGetToken(';');
break;
case SBARINFO_STATUSBAR:
+ case SBARINFO_APPENDSTATUSBAR: // [Binary] This uses the same code as the above case.
{
if(!baseSet) //If the user didn't explicitly define a base, do so now.
gameType = GAME_Any;
@@ -632,11 +637,19 @@
sc.MustGetToken(TK_Identifier);
barNum = sc.MustMatchString(StatusBars);
}
- if (this->huds[barNum] != NULL)
+ // [Binary] SBARINFO_APPENDSTATUSBAR shouldn't delete the old HUD if it exists.
+ if (command != SBARINFO_APPENDSTATUSBAR)
{
- delete this->huds[barNum];
+ if (this->huds[barNum] != NULL)
+ {
+ delete this->huds[barNum];
+ }
+ this->huds[barNum] = new SBarInfoMainBlock(this);
}
- this->huds[barNum] = new SBarInfoMainBlock(this);
+ else if (this->huds[barNum] == NULL)
+ {
+ sc.ScriptError( "AppendStatusBar can't be used on a HUD that doesn't exist yet." );
+ }
if(barNum == STBAR_AUTOMAP)
{
automapbar = true;
AppendStatusBar-2c.patch [^] (3,715 bytes) 2024-11-23 16:25 [Show Content] [Hide Content]# HG changeset patch
# User Binary Code
# Date 1732379039 28800
# Sat Nov 23 08:23:59 2024 -0800
# Node ID 0f7e4a2a172c8411d4f8525c299d79decb2548e3
# Parent 4e8342339656a2dbe6538c2276769866481c298f
Added new SBARINFO top level "AppendStatusBar" to allow for adding extra SBARINFO code onto existing custom SBARINFO definitions.
diff -r 4e8342339656 -r 0f7e4a2a172c docs/zandronum-history.txt
--- a/docs/zandronum-history.txt Sun Oct 27 17:39:14 2024 -0400
+++ b/docs/zandronum-history.txt Sat Nov 23 08:23:59 2024 -0800
@@ -72,6 +72,7 @@
+ - Added the CVar "cl_showscoreleft", which if disabled will turn "x things left" messages on the scoreboard into "x things to win" and show the current score limit instead of how much is left to win. This only affects frags, points, and wins. [Kaminsky]
+ - Added ACS functions: "GetPlayerJoinQueuePosition" and "SkipJoinQueue", to return the player's position in the join queue and allow true spectators in the join queue to join the game outside of normal game mode rules. Modders can also take advantage of the new GAMEEVENT_JOINQUEUECHANGED EVENT script type to know when players are added or removed from the join queue. [Kaminsky]
+ - Added over a hundred new text colors recently made by Fuzzball. [Kaminsky]
++ - Added new SBARINFO top level "AppendStatusBar" to allow for adding extra SBARINFO code onto existing custom SBARINFO definitions. [Binary]
- - Fixed: clients didn't initialize a sector's friction properly in some cases due to a superfluous check that wasn't removed earlier. [Kaminsky]
- - Fixed: the server wouldn't initialize compatflags and compatflags2 properly if entered as command line parameters. [Kaminsky]
- - Fixed: serverinfo CVars entered on the command line were restored in reverse order. [Kaminsky]
diff -r 4e8342339656 -r 0f7e4a2a172c src/g_shared/sbarinfo.cpp
--- a/src/g_shared/sbarinfo.cpp Sun Oct 27 17:39:14 2024 -0400
+++ b/src/g_shared/sbarinfo.cpp Sat Nov 23 08:23:59 2024 -0800
@@ -373,6 +373,7 @@
SBARINFO_STATUSBAR,
SBARINFO_MUGSHOT,
SBARINFO_CREATEPOPUP,
+ SBARINFO_APPENDSTATUSBAR, // [Binary] Additive SBARINFO implementation.
};
enum //Bar types
@@ -401,6 +402,7 @@
"statusbar",
"mugshot",
"createpopup",
+ "appendstatusbar", // [Binary] Additive SBARINFO implementation.
NULL
};
@@ -482,7 +484,9 @@
continue;
}
int baselump = -2;
- switch(sc.MustMatchString(SBarInfoTopLevel))
+ // [Binary] Store the command, used for the switch statement and case SBARINFO_APPENDSTATUSBAR.
+ const int command = sc.MustMatchString(SBarInfoTopLevel);
+ switch(command)
{
case SBARINFO_BASE:
baseSet = true;
@@ -623,6 +627,7 @@
sc.MustGetToken(';');
break;
case SBARINFO_STATUSBAR:
+ case SBARINFO_APPENDSTATUSBAR: // [Binary] This uses the same code as the above case.
{
if(!baseSet) //If the user didn't explicitly define a base, do so now.
gameType = GAME_Any;
@@ -632,11 +637,19 @@
sc.MustGetToken(TK_Identifier);
barNum = sc.MustMatchString(StatusBars);
}
- if (this->huds[barNum] != NULL)
+ // [Binary] SBARINFO_APPENDSTATUSBAR shouldn't delete the old HUD if it exists.
+ if (command != SBARINFO_APPENDSTATUSBAR)
{
- delete this->huds[barNum];
+ if (this->huds[barNum] != NULL)
+ {
+ delete this->huds[barNum];
+ }
+ this->huds[barNum] = new SBarInfoMainBlock(this);
}
- this->huds[barNum] = new SBarInfoMainBlock(this);
+ else if (this->huds[barNum] == NULL)
+ {
+ sc.ScriptError("Status bar '%s' has not been created and cannot be appended to. Use 'StatusBar' instead.", StatusBars[barNum]);
+ }
if(barNum == STBAR_AUTOMAP)
{
automapbar = true;
Zan-AppendStatusBar-1.pk3 [^] (643 bytes) 2024-11-24 21:32 |