- split DObject::Destroy into the main method, a native OnDestroy and a scripted OnDestroy method and made the main method non-virtual
This was done to ensure it can be properly overridden in scripts without causing problems when called during engine shutdown for the type and symbol objects the VM needs to work and to have the scripted version always run first. Since the scripted OnDestroy method never calls the native version - the native one is run after the scripted one - this can be simply skipped over during shutdown.
This commit is contained in:
parent
0b94d4e0a3
commit
7b7623d2c4
58 changed files with 175 additions and 154 deletions
|
|
@ -63,7 +63,7 @@ class DMessageBoxMenu : public DMenu
|
|||
public:
|
||||
|
||||
DMessageBoxMenu(DMenu *parent = NULL, const char *message = NULL, int messagemode = 0, bool playsound = false, FName action = NAME_None);
|
||||
void Destroy() override;
|
||||
void OnDestroy() override;
|
||||
void Init(DMenu *parent, const char *message, int messagemode, bool playsound = false);
|
||||
void Drawer();
|
||||
bool Responder(event_t *ev);
|
||||
|
|
@ -124,11 +124,11 @@ void DMessageBoxMenu::Init(DMenu *parent, const char *message, int messagemode,
|
|||
//
|
||||
//=============================================================================
|
||||
|
||||
void DMessageBoxMenu::Destroy()
|
||||
void DMessageBoxMenu::OnDestroy()
|
||||
{
|
||||
if (mMessage != NULL) V_FreeBrokenLines(mMessage);
|
||||
mMessage = NULL;
|
||||
Super::Destroy();
|
||||
Super::OnDestroy();
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue