From 19b8e15af41dc3909d0739beaf97f0c18081ba16 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 16 Dec 2010 08:05:00 +0000 Subject: [PATCH] - added APROP_Dormant actor property for ACS (read only!) - fixed_ When performing a restart menus and intermissions need to be closed first. SVN r3048 (trunk) --- src/d_main.cpp | 3 +++ src/p_acs.cpp | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/d_main.cpp b/src/d_main.cpp index aaeea7e3f..f0a8a0c41 100644 --- a/src/d_main.cpp +++ b/src/d_main.cpp @@ -2336,6 +2336,9 @@ void D_DoomMain (void) S_StopMusic(true); S_StopAllChannels (); + M_ClearMenus(); // close menu if open + F_EndFinale(); // If an intermission is active, end it now + // clean up game state ST_Clear(); D_ErrorCleanup (); diff --git a/src/p_acs.cpp b/src/p_acs.cpp index 34275da14..cd9d3c7a2 100644 --- a/src/p_acs.cpp +++ b/src/p_acs.cpp @@ -2541,6 +2541,7 @@ enum APROP_WaterLevel = 28, APROP_ScaleX = 29, APROP_ScaleY = 30, + APROP_Dormant = 31, }; // These are needed for ACS's APROP_RenderStyle @@ -2769,6 +2770,7 @@ int DLevelScript::GetActorProperty (int tid, int property) case APROP_Friendly: return !!(actor->flags & MF_FRIENDLY); case APROP_Notarget: return !!(actor->flags3 & MF3_NOTARGET); case APROP_Notrigger: return !!(actor->flags6 & MF6_NOTRIGGER); + case APROP_Dormant: return !!(actor->flags2 & MF2_DORMANT); case APROP_SpawnHealth: if (actor->IsKindOf (RUNTIME_CLASS (APlayerPawn))) { return static_cast(actor)->MaxHealth; @@ -2838,6 +2840,7 @@ int DLevelScript::CheckActorProperty (int tid, int property, int value) case APROP_Friendly: case APROP_Notarget: case APROP_Notrigger: + case APROP_Dormant: return (GetActorProperty(tid, property) == (!!value)); // Strings are not covered by GetActorProperty, so make the check here