mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2025-02-27 05:30:56 +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 "gstrings.h"
|
||||||
#include "cmdlib.h"
|
#include "cmdlib.h"
|
||||||
#include "g_levellocals.h"
|
#include "g_levellocals.h"
|
||||||
|
#include "virtual.h"
|
||||||
|
|
||||||
#define ARTIFLASH_OFFSET (statusBar->invBarOffset+6)
|
#define ARTIFLASH_OFFSET (statusBar->invBarOffset+6)
|
||||||
enum
|
enum
|
||||||
|
@ -1545,10 +1546,16 @@ DBaseStatusBar *CreateCustomStatusBar(int scriptno)
|
||||||
I_FatalError("Tried to create a status bar with no script!");
|
I_FatalError("Tried to create a status bar with no script!");
|
||||||
|
|
||||||
auto sbar = (DBaseStatusBar*)PClass::FindClass("SBarInfoWrapper")->CreateNew();
|
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);
|
auto core = new DSBarInfo(sbar, script);
|
||||||
sbar->PointerVar<DSBarInfo>("core") = core;
|
sbar->PointerVar<DSBarInfo>("core") = core;
|
||||||
sbar->SetSize(script->height, script->_resW, script->_resH);
|
sbar->SetSize(script->height, script->_resW, script->_resH);
|
||||||
sbar->CompleteBorder = script->completeBorder;
|
sbar->CompleteBorder = script->completeBorder;
|
||||||
|
|
||||||
return sbar;
|
return sbar;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue