From a445b8486a375ea435d69c0e1ec60e0582e7a0d2 Mon Sep 17 00:00:00 2001 From: Spoike Date: Tue, 10 Dec 2013 20:52:28 +0000 Subject: [PATCH] fix terrain not saving properly git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4564 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/gl/gl_heightmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/gl/gl_heightmap.c b/engine/gl/gl_heightmap.c index ab24feb35..760a42439 100644 --- a/engine/gl/gl_heightmap.c +++ b/engine/gl/gl_heightmap.c @@ -1560,7 +1560,6 @@ static qboolean Terr_SaveSection(heightmap_t *hm, hmsection_t *s, int sx, int sy dblock_t dbh; sx = sx & ~(SECTIONSPERBLOCK-1); sy = sy & ~(SECTIONSPERBLOCK-1); - fname = Terr_DiskBlockName(hm, sx, sy); //make sure its loaded before we replace the file for (y = 0; y < SECTIONSPERBLOCK; y++) @@ -1573,6 +1572,7 @@ static qboolean Terr_SaveSection(heightmap_t *hm, hmsection_t *s, int sx, int sy } } + fname = Terr_DiskBlockName(hm, sx, sy); FS_CreatePath(fname, FS_GAMEONLY); f = FS_OpenVFS(fname, "wb", FS_GAMEONLY); if (!f)