mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 23:02:08 +00:00
- fixed: Even SBARINFO needs to call the scripted Init method of the status bar because it initializes some data used by the automap HUD.
This commit is contained in:
parent
91ac6e30fe
commit
228c57fae3
1 changed files with 7 additions and 0 deletions
|
@ -57,6 +57,7 @@
|
|||
#include "gstrings.h"
|
||||
#include "cmdlib.h"
|
||||
#include "g_levellocals.h"
|
||||
#include "virtual.h"
|
||||
|
||||
#define ARTIFLASH_OFFSET (statusBar->invBarOffset+6)
|
||||
enum
|
||||
|
@ -1545,10 +1546,16 @@ DBaseStatusBar *CreateCustomStatusBar(int scriptno)
|
|||
I_FatalError("Tried to create a status bar with no script!");
|
||||
|
||||
auto sbar = (DBaseStatusBar*)PClass::FindClass("SBarInfoWrapper")->CreateNew();
|
||||
IFVIRTUALPTR(sbar, DBaseStatusBar, Init)
|
||||
{
|
||||
VMValue params[] = { sbar };
|
||||
GlobalVMStack.Call(func, params, 1, nullptr, 0);
|
||||
}
|
||||
auto core = new DSBarInfo(sbar, script);
|
||||
sbar->PointerVar<DSBarInfo>("core") = core;
|
||||
sbar->SetSize(script->height, script->_resW, script->_resH);
|
||||
sbar->CompleteBorder = script->completeBorder;
|
||||
|
||||
return sbar;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue