From e586fa650a0579b63d81baeb0b706ab592923052 Mon Sep 17 00:00:00 2001 From: terminx Date: Mon, 31 Mar 2008 02:55:50 +0000 Subject: [PATCH] Con access to ud.levelstats git-svn-id: https://svn.eduke32.com/eduke32@674 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/gamedef.c | 1 + polymer/eduke32/source/gamedef.h | 3 ++- polymer/eduke32/source/gameexec.c | 9 +++++++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/polymer/eduke32/source/gamedef.c b/polymer/eduke32/source/gamedef.c index 67dfefed3..fe4baae17 100644 --- a/polymer/eduke32/source/gamedef.c +++ b/polymer/eduke32/source/gamedef.c @@ -833,6 +833,7 @@ static const memberlabel_t userdefslabels[]= { "weaponsway", USERDEFS_WEAPONSWAY, 0, 0 }, { "angleinterpolation", USERDEFS_ANGLEINTERPOLATION, 0, 0 }, { "deathmsgs", USERDEFS_DEATHMSGS, 0, 0 }, + { "levelstats", USERDEFS_LEVELSTATS, 0, 0 }, { "", -1, 0, 0 } // END OF LIST }; diff --git a/polymer/eduke32/source/gamedef.h b/polymer/eduke32/source/gamedef.h index bbcd8dfbc..af4f67211 100644 --- a/polymer/eduke32/source/gamedef.h +++ b/polymer/eduke32/source/gamedef.h @@ -335,7 +335,8 @@ enum userdefslabels USERDEFS_VIEWBOB, USERDEFS_WEAPONSWAY, USERDEFS_ANGLEINTERPOLATION, - USERDEFS_DEATHMSGS + USERDEFS_DEATHMSGS, + USERDEFS_LEVELSTATS }; enum sectorlabels diff --git a/polymer/eduke32/source/gameexec.c b/polymer/eduke32/source/gameexec.c index 1e8ba4b09..bdf6ed0f6 100644 --- a/polymer/eduke32/source/gameexec.c +++ b/polymer/eduke32/source/gameexec.c @@ -850,6 +850,15 @@ static void DoUserDef(int iSet, int lLabelID, int lVar2) SetGameVarID(lVar2, ud.deathmsgs, g_i, g_p); return; + case USERDEFS_LEVELSTATS: + if (iSet) + { + ud.levelstats = lValue; + return; + } + SetGameVarID(lVar2, ud.levelstats, g_i, g_p); + return; + default: return; }