]> granicus.if.org Git - nethack/commitdiff
Tutorial: reset inventory letters
authorPasi Kallinen <paxed@alt.org>
Sun, 5 Mar 2023 15:54:09 +0000 (17:54 +0200)
committerPasi Kallinen <paxed@alt.org>
Sun, 5 Mar 2023 15:54:14 +0000 (17:54 +0200)
src/nhlua.c

index 26793e90ad773687e8d7ab80d1e10cac9182a9ac..e1c8f3dc4b54d156866241ee1160fa6d013d17eb 100644 (file)
@@ -1581,6 +1581,7 @@ nhl_gamestate(lua_State *L)
     if (reststate && stored) {
         /* restore game state */
         gm.moves = moves;
+        gl.lastinvnr = 51;
         while (gi.invent)
             useupall(gi.invent);
         while (invent) {
@@ -1604,6 +1605,7 @@ nhl_gamestate(lua_State *L)
             otmp->owornmask = wornmask;
             invent = otmp;
         }
+        gl.lastinvnr = 51;
         moves = gm.moves;
         stored = TRUE;
     }