Back to the Vavoom Forum Archives


Forum

[Fixed] [1.20-Linux] glvis process fails with *.gwa in $HOME

Thu, 27 Apr 2006 21:01:30

scen

In this release config files and *.gwa files are created and stored in $HOME/.vavoom (thanks a lot for this, Janis <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> ), but glvis fails to process the WAD, because (i have noticed), it wants, in the same dir, both file.wad and file.gwa, but in this case first is in Vavoom data dir (/usr/share/games/vavoom, for me) and the second is in $HOME/.vavoom. A solution to this problem is process wad file with "external" glbsp+glvis, so vavoom doesnt' have to process again the wad files. Is there a solution or any workaround to permit a smooth WAD process by Vavoom executable?
Sat, 29 Apr 2006 15:02:30

Janis Legzdinsh

Fixed. Here's a patch, in a case you need this:
Index: utils/glvis/level.cpp
===================================================================
--- utils/glvis/level.cpp	(revision 1456)
+++ utils/glvis/level.cpp	(working copy)
@@ -33,8 +33,6 @@
 
 // MACROS ------------------------------------------------------------------
 
-#define TEMP_FILE	"$glvis$$.$$$"
-
 // TYPES -------------------------------------------------------------------
 
 // EXTERNAL FUNCTION PROTOTYPES --------------------------------------------
@@ -864,6 +862,7 @@
 {
 	char filename[1024];
 	char destfile[1024];
+	char tempfile[1024];
 	char bakext[8];
 
 	if (Owner.Malloc && Owner.Free)
@@ -907,7 +906,10 @@
 		strcpy(bakext, ".~wa");
 	}
 
-	outwad.Open(TEMP_FILE, glwad->wadid);
+	strcpy(tempfile, destfile);
+	StripFilename(tempfile);
+	if (tempfile[0])
+		strcat(tempfile, "/");
+	strcat(tempfile, "$glvis$$.$$$");
+	outwad.Open(tempfile, glwad->wadid);
 
 	//	Process lumps
 	if (mainwad == glwad)
@@ -931,7 +933,7 @@
 	strcat(filename, bakext);
 	remove(filename);
 	rename(destfile, filename);
-	rename(TEMP_FILE, destfile);
+	rename(tempfile, destfile);
 }
 
 } // namespace VavoomUtils

Back to the Vavoom Forum Archives