Seed command fully implemented but apparently buggy.
[open-adventure.git] / actions1.c
index b8fac67a3a162a94bbb2c6df66c339f8fedf2d8c..0a1155d800c355058c63506e76519b8c2b7f0891 100644 (file)
@@ -625,6 +625,14 @@ L8340:     if(!AT(RESER) && LOC != FIXED[RESER]-1) return(2011);
        RSPEAK(241);
         return(2);
 
-L8350: printf("I see a SEED command. %s\n", raw_input);
-        return(2);
+/* Seed.  Expected in game logs to replicate the LCG state */
+
+L8350: {
+            long sv;
+            int n;
+            n = sscanf(raw_input, "seed %ld\n", &sv);
+            if (n >= 1)
+                set_seed(sv);
+            return(2);
+        }
 }