diff --git a/polymer/eduke32/source/gamedef.c b/polymer/eduke32/source/gamedef.c index a1c2286a9..47e0d3f26 100644 --- a/polymer/eduke32/source/gamedef.c +++ b/polymer/eduke32/source/gamedef.c @@ -1164,6 +1164,8 @@ const memberlabel_t UserdefsLabels[]= { "musictoggle", USERDEFS_MUSICTOGGLE, 0, 0 }, { "gametypeflags", USERDEFS_GAMETYPEFLAGS, 0, 0 }, { "m_gametypeflags", USERDEFS_M_GAMETYPEFLAGS, 0, 0 }, + { "globalflags", USERDEFS_GLOBALFLAGS, 0, 0 }, + { "globalgameflags", USERDEFS_GLOBALGAMEFLAGS, 0, 0 }, { "", -1, 0, 0 } // END OF LIST }; diff --git a/polymer/eduke32/source/gamedef.h b/polymer/eduke32/source/gamedef.h index 3f084c219..b885299e0 100644 --- a/polymer/eduke32/source/gamedef.h +++ b/polymer/eduke32/source/gamedef.h @@ -470,6 +470,8 @@ enum UserdefsLabel_t USERDEFS_USEMODELS, USERDEFS_GAMETYPEFLAGS, USERDEFS_M_GAMETYPEFLAGS, + USERDEFS_GLOBALFLAGS, + USERDEFS_GLOBALGAMEFLAGS, USERDEFS_END }; diff --git a/polymer/eduke32/source/gamestructures.c b/polymer/eduke32/source/gamestructures.c index 30e8eaaa8..6bdd6f0c3 100644 --- a/polymer/eduke32/source/gamestructures.c +++ b/polymer/eduke32/source/gamestructures.c @@ -168,6 +168,8 @@ int32_t __fastcall VM_GetUserdef(register int32_t lLabelID) break; case USERDEFS_GAMETYPEFLAGS: lLabelID = GametypeFlags[ud.coop]; break; case USERDEFS_M_GAMETYPEFLAGS: lLabelID = GametypeFlags[ud.m_coop]; break; + case USERDEFS_GLOBALFLAGS: lLabelID = globalflags; break; + case USERDEFS_GLOBALGAMEFLAGS: lLabelID = duke3d_globalflags; break; default: lLabelID = -1; break; } @@ -282,6 +284,8 @@ void __fastcall VM_SetUserdef(register int32_t const lLabelID, register int32_t case USERDEFS_RUNKEY_MODE: ud.runkey_mode = iSet; break; case USERDEFS_M_ORIGIN_X: ud.m_origin.x = iSet; break; case USERDEFS_M_ORIGIN_Y: ud.m_origin.y = iSet; break; + case USERDEFS_GLOBALFLAGS: globalflags = iSet; break; + case USERDEFS_GLOBALGAMEFLAGS: duke3d_globalflags = iSet; break; default: break; } }