From b029b458f388b565dfa02555d9262008f969131a Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Tue, 1 Jan 2008 17:54:05 +0000 Subject: [PATCH] Don't set NETHACKOPTIONS env var inside dgl, set it in config file. git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@393 db0b04b0-f4d1-0310-9a6d-de3e77497b0e --- dgamelaunch.c | 2 ++ examples/dgamelaunch.conf | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/dgamelaunch.c b/dgamelaunch.c index 2884c5a..cde3e52 100644 --- a/dgamelaunch.c +++ b/dgamelaunch.c @@ -2075,10 +2075,12 @@ main (int argc, char** argv) */ /* environment */ + /* if (myconfig[userchoice]->rcfile) { snprintf (atrcfilename, 81, "@%s", dgl_format_str(userchoice, me, myconfig[userchoice]->rc_fmt)); mysetenv ("NETHACKOPTIONS", atrcfilename, 1); } + */ len = strlen(myconfig[userchoice]->spool) + strlen (me->username) + 1; spool = malloc (len + 1); diff --git a/examples/dgamelaunch.conf b/examples/dgamelaunch.conf index 94289cf..d9e7dcf 100644 --- a/examples/dgamelaunch.conf +++ b/examples/dgamelaunch.conf @@ -143,7 +143,9 @@ rc_fmt = "%rrcfiles/%n.nethackrc" inprogressdir = "inprogress-nethack/" # back up savefile -commands = cp "/var/games/nethack/save/%u%n.gz" "/var/games/nethack/save/%u%n.gz.bak" +commands = cp "/var/games/nethack/save/%u%n.gz" "/var/games/nethack/save/%u%n.gz.bak", +# set NETHACKOPTIONS to point to the rcfile + setenv "NETHACKOPTIONS" "@%rrcfiles/%n.nethackrc" }