From cf9f8a101cbc2301320059bc03402ad0cbe5beda Mon Sep 17 00:00:00 2001 From: terminx Date: Sat, 22 Jul 2006 23:02:08 +0000 Subject: [PATCH] Disable parental lock in NAM git-svn-id: https://svn.eduke32.com/eduke32@245 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/config.c | 16 ++++++++++++---- polymer/eduke32/source/menus.c | 2 +- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/polymer/eduke32/source/config.c b/polymer/eduke32/source/config.c index a76aecac0..4b47a328b 100644 --- a/polymer/eduke32/source/config.c +++ b/polymer/eduke32/source/config.c @@ -594,7 +594,12 @@ int32 CONFIG_ReadSetup( void ) SCRIPT_GetString( scripthandle, "Comm Setup","RTSName",&ud.rtsname[0]); SCRIPT_GetNumber( scripthandle, "Screen Setup", "Shadows",&ud.shadows); - SCRIPT_GetString( scripthandle, "Screen Setup","Password",&ud.pwlockout[0]); + + if (!NAM) { + SCRIPT_GetString( scripthandle, "Screen Setup","Password",&ud.pwlockout[0]); + SCRIPT_GetNumber( scripthandle, "Screen Setup", "Out",&ud.lockout); + } + SCRIPT_GetNumber( scripthandle, "Screen Setup", "Detail",&ud.detail); SCRIPT_GetNumber( scripthandle, "Screen Setup", "Tilt",&ud.screen_tilting); SCRIPT_GetNumber( scripthandle, "Screen Setup", "Messages",&ud.fta_on); @@ -603,7 +608,6 @@ int32 CONFIG_ReadSetup( void ) SCRIPT_GetNumber( scripthandle, "Screen Setup", "ScreenMode",&ScreenMode); SCRIPT_GetNumber( scripthandle, "Screen Setup", "ScreenGamma",&ud.brightness); SCRIPT_GetNumber( scripthandle, "Screen Setup", "ScreenSize",&ud.screen_size); - SCRIPT_GetNumber( scripthandle, "Screen Setup", "Out",&ud.lockout); #if defined(POLYMOST) && defined(USE_OPENGL) SCRIPT_GetNumber( scripthandle, "Screen Setup", "ScreenBPP", &ScreenBPP); @@ -771,8 +775,12 @@ void CONFIG_WriteSetup( void ) SCRIPT_PutNumber( scripthandle, "Screen Setup", "MaxRefreshFreq",maxrefreshfreq,false,false); #endif SCRIPT_PutNumber( scripthandle, "Screen Setup", "Messages",ud.fta_on,false,false); - SCRIPT_PutNumber( scripthandle, "Screen Setup", "Out",ud.lockout,false,false); - SCRIPT_PutString( scripthandle, "Screen Setup", "Password",ud.pwlockout); + + if (!NAM) { + SCRIPT_PutNumber( scripthandle, "Screen Setup", "Out",ud.lockout,false,false); + SCRIPT_PutString( scripthandle, "Screen Setup", "Password",ud.pwlockout); + } + SCRIPT_PutNumber( scripthandle, "Screen Setup", "ScreenBPP",ScreenBPP,false,false); // JBF 20040523 SCRIPT_PutNumber( scripthandle, "Screen Setup", "ScreenGamma",ud.brightness,false,false); SCRIPT_PutNumber( scripthandle, "Screen Setup", "ScreenHeight",ScreenHeight,false,false); // JBF 20031206 diff --git a/polymer/eduke32/source/menus.c b/polymer/eduke32/source/menus.c index 0a9996d76..852ab055b 100644 --- a/polymer/eduke32/source/menus.c +++ b/polymer/eduke32/source/menus.c @@ -2373,7 +2373,7 @@ cheat_for_port_credits: } enabled = 1; switch (io) { - case 0: if (x==io) cmenu(10000); break; + case 0: if(!NAM) { if (x==io) cmenu(10000); } else enabled = 0; break; case 1: if (x==io) { ud.drawweapon = (ud.drawweapon == 2) ? 0 : ud.drawweapon+1; } modval(0,2,(int *)&ud.drawweapon,1,probey==io); { char *s[] = { "Off", "On", "Icon" };