summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAleksey Veresov <aleksey@veresov.pro>2021-03-02 13:27:42 +0300
committerAleksey Veresov <aleksey@veresov.pro>2021-03-02 13:27:42 +0300
commit31f5b4cb47f0ac3d2b1f94979725d48340b5c57b (patch)
treeeb841495671e2d6729097154f917d00840d2455e /src
parentf241e0d5c8a79c266a4801aeb90b4d73fd87ee25 (diff)
downloadtakethis-31f5b4cb47f0ac3d2b1f94979725d48340b5c57b.tar
takethis-31f5b4cb47f0ac3d2b1f94979725d48340b5c57b.tar.xz
takethis-31f5b4cb47f0ac3d2b1f94979725d48340b5c57b.zip
Fix.
Diffstat (limited to 'src')
-rw-r--r--src/game.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/game.c b/src/game.c
index 5806c57..e47e6b0 100644
--- a/src/game.c
+++ b/src/game.c
@@ -7,6 +7,7 @@
int magic = 0;
+int first_gulag = 1;
static int ticks;
@@ -64,6 +65,7 @@ static int readnum(FILE *f)
static void save()
{
FILE *f = fopen("save", "w");
+ outnum(f, first_gulag);
if (curmus == grib) fputs("g\n", f);
else if (curmus == ussr) fputs("u\n", f);
else if (curmus == stalin) fputs("s\n", f);
@@ -151,6 +153,7 @@ static void save()
static void load()
{
FILE *f = fopen("save", "r");
+ first_gulag = readnum(f);
int c = fgetc(f);
if (c == 'g') {
if (curmus != grib) {
@@ -344,7 +347,6 @@ static void step(int d)
}
} else if (lenin_grib) lenin_grib = 0;
}
- static int first_gulag = 1;
if (ttplayer.tobein_gulag && ttplayer.until_gulag > 0) {
if (first_gulag) {
first_gulag = 0;