problem with -gl view

problem with -gl view

Re: problem with -gl view Posted by Riven on Sun Aug 28th 2005 at 10:04pm
Riven
1640 posts
Posted 2005-08-28 10:04pm
Riven
Wuch ya look'n at?
super admin
1640 posts 1266 snarkmarks Registered: May 2nd 2005 Occupation: Architect Location: Austin, Texas, USA
yes,... after correctly entering the correct parameters into the expert compile window to run -gl view, hammer runs the compile process window and gl view opens and stops there with an error immediately after saying: "couldn't open c:/program files/steam/steamapps/(my user name)@cox-internet.prt"

it wont let me move around in -gl view, but i can see the map with its visleafs in grey and everything. so i click ok, and -gl view closes/. any idea what im doing wrong? (yes i've clicked the close sign on the error window as well)
Re: problem with -gl view Posted by zombie_computer on Mon Aug 29th 2005 at 10:05am
zombie_computer
28 posts
Posted 2005-08-29 10:05am
28 posts 3 snarkmarks Registered: Feb 15th 2005 Location: Netherlands
glview is a very buggy program that shouldve never been released to the
sdk. Just look at its source. I also found some strange function to
load displacements and detail brushes, i was getting the feeling glview
was suppossed to be somekind of BSP preview program...

as for your problems, if you have a dot in your glview paths then it
wont work. why? Because glview loads the glfile, and then, to load the
prt file, it finds the FIRST dot in the string and pastes .prt behind
that. The programmer never realised that since dos version x.x we are
allowed to have dots in mapnames/foldernames...

you must first copy the glfile and the portalfile (either manually or
using the expert compile mode commands) to a path without dots in em,
and then load the stuff from there. Or, you shouldve chosen a steam
name without a dot :razz:

As for the other commands for glview, they are FU'ed too

when starting glview, make sure the last argument is the path to the gl file

when trying to highlight a portal, make sure the portalnumber comes before the -portalhighlight argument, so dont do

glview.exe -portal -portalhighlight 322

as the vvis error tells you to, but

glview.exe -portal 322 -portalhighlight

the -portal parameter (telling glview to load the portalfile) can be
placed ANYWHERE, as long as it doesnt interfere with the other rules
Re: problem with -gl view Posted by Riven on Mon Aug 29th 2005 at 9:19pm
Riven
1640 posts
Posted 2005-08-29 9:19pm
Riven
Wuch ya look'n at?
super admin
1640 posts 1266 snarkmarks Registered: May 2nd 2005 Occupation: Architect Location: Austin, Texas, USA
It is true, that in fact my username does have a dot within it, so the portal filepath is cut-off short by that dot. I know as of right now that there is no way to change a steam account name, so is there perhaps a line of code that i could paste into the source of the -gl view engine to fix this problem?
Re: problem with -gl view Posted by zombie_computer on Tue Aug 30th 2005 at 2:01pm
zombie_computer
28 posts
Posted 2005-08-30 2:01pm
28 posts 3 snarkmarks Registered: Feb 15th 2005 Location: Netherlands
well, theres two options. either by code or by hammer

starting with the easiest, in hammer, try:

<pre>Command: parameters:
$bsp_exe -glview $path\$file
copy file $path\$file.gl C:\temp\
copy file $path\$file.prt C:\temp\
glview -portal C:\temp\$file.gl

where glview is the full path to the glview exe, and C:\temp is some folder
without a name you want your stuff to be copied.

or

open up glview.cpp, and change around line 1085:

<span style="color: blue;">if (g_bReadPortals)
{
// Copy file again and this time look for the . from .gl? so we can concatenate .prt
// and open the portal file.
char szTempCmd[MAX_PATH];
strcpy(szTempCmd, pFileName);
char *pTmp = szTempCmd;
while (pTmp && *pTmp && *pTmp != '.')
{
pTmp++;
}
*pTmp = '\0';
strcat(szTempCmd, ".prt");
ReadPortalFile(szTempCmd);
};

<span style="color: white;">into

if (g_bReadPortals)
{
// Copy file again and this time look for the LAST . from .gl so we can concatenate .prt
// and open the portal file.
char szTempCmd[MAX_PATH];
strcpy(szTempCmd, pFileName);
char *pTmp = szTempCmd + strlen(szTempCmd);
while (pTmp && *pTmp != '.')
{
pTmp--;
}
strcpy(*pTmp, ".prt");
ReadPortalFile(szTempCmd);
};
</span></span>
that should solve the path bug anyways
</pre>