GLQuake Bug: Nvidia Extension Limit must be off
Moderator: InsideQC Admins
25 posts
• Page 2 of 2 • 1, 2
Aside from not working across firewalls or routers? And being pretty crap to begin with?
The sound code is also f-cked by the way. Writing to the primary buffer with DirectSound is not a nice thing to do, and no well-behaved app should do it.
The netcode fix is something that's already in ProQuake and a few others. There's a partial fix in many other engines too, but that doesn't work on some servers. I put a full fix in DirectQ some time back but never really investigated exactly what was required (must do that sometime!) As soon as info on the full fix emerges I'm sure it'll be posted here and tutorialized.
For the sound code you need to hack around in SNDDMA_InitDirect. All you really need is this block (it should be obvious what it replaces):
Input is f-cked too. As is physics, and the filesystem (it's case-sensitive!), the memory allocator is an unholy mess, the chase cam is f-cked, etc etc etc.
These are all problems that have been worked over throughout the years, and I'd seriously say that I don't envy you one bit starting fresh at them.
The sound code is also f-cked by the way. Writing to the primary buffer with DirectSound is not a nice thing to do, and no well-behaved app should do it.
The netcode fix is something that's already in ProQuake and a few others. There's a partial fix in many other engines too, but that doesn't work on some servers. I put a full fix in DirectQ some time back but never really investigated exactly what was required (must do that sometime!) As soon as info on the full fix emerges I'm sure it'll be posted here and tutorialized.
For the sound code you need to hack around in SNDDMA_InitDirect. All you really need is this block (it should be obvious what it replaces):
- Code: Select all
#ifndef MHGLQFIX
if (!COM_CheckParm ("-snoforceformat"))
{
if (DS_OK == pDS->lpVtbl->CreateSoundBuffer(pDS, &dsbuf, &pDSPBuf, NULL))
{
pformat = format;
if (DS_OK != pDSPBuf->lpVtbl->SetFormat (pDSPBuf, &pformat))
{
if (snd_firsttime)
Con_SafePrintf ("Set primary sound buffer format: no\n");
}
else
{
if (snd_firsttime)
Con_SafePrintf ("Set primary sound buffer format: yes\n");
primary_format_set = true;
}
}
}
#endif
#ifndef MHGLQFIX
if (!primary_format_set || !COM_CheckParm ("-primarysound"))
{
#endif
// create the secondary buffer we'll actually work with
memset (&dsbuf, 0, sizeof(dsbuf));
dsbuf.dwSize = sizeof(DSBUFFERDESC);
dsbuf.dwFlags = DSBCAPS_CTRLFREQUENCY | DSBCAPS_LOCSOFTWARE;
dsbuf.dwBufferBytes = SECONDARY_BUFFER_SIZE;
dsbuf.lpwfxFormat = &format;
memset(&dsbcaps, 0, sizeof(dsbcaps));
dsbcaps.dwSize = sizeof(dsbcaps);
if (DS_OK != pDS->lpVtbl->CreateSoundBuffer(pDS, &dsbuf, &pDSBuf, NULL))
{
Con_SafePrintf ("DS:CreateSoundBuffer Failed");
FreeSound ();
return SIS_FAILURE;
}
shm->channels = format.nChannels;
shm->samplebits = format.wBitsPerSample;
shm->speed = format.nSamplesPerSec;
if (DS_OK != pDSBuf->lpVtbl->GetCaps (pDSBuf, &dsbcaps))
{
Con_SafePrintf ("DS:GetCaps failed\n");
FreeSound ();
return SIS_FAILURE;
}
if (snd_firsttime)
Con_SafePrintf ("Using secondary sound buffer\n");
#ifndef MHGLQFIX
}
else
{
if (DS_OK != pDS->lpVtbl->SetCooperativeLevel (pDS, mainwindow, DSSCL_WRITEPRIMARY))
{
Con_SafePrintf ("Set coop level failed\n");
FreeSound ();
return SIS_FAILURE;
}
if (DS_OK != pDSPBuf->lpVtbl->GetCaps (pDSPBuf, &dsbcaps))
{
Con_Printf ("DS:GetCaps failed\n");
return SIS_FAILURE;
}
pDSBuf = pDSPBuf;
Con_SafePrintf ("Using primary sound buffer\n");
}
#endif
Input is f-cked too. As is physics, and the filesystem (it's case-sensitive!), the memory allocator is an unholy mess, the chase cam is f-cked, etc etc etc.
These are all problems that have been worked over throughout the years, and I'd seriously say that I don't envy you one bit starting fresh at them.
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
We knew the words, we knew the score, we knew what we were fighting for
-

mh - Posts: 2292
- Joined: Sat Jan 12, 2008 1:38 am
mh wrote:Input is f-cked too. As is physics, and the filesystem (it's case-sensitive!)
Hmm, case-sensitive filesystem rocks. Too bad Windows can't handle this properly
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC
(LordHavoc)
-

frag.machine - Posts: 2090
- Joined: Sat Nov 25, 2006 1:49 pm
mh wrote:frag.machine wrote:case-sensitive filesystem rocks.
Not if you're a Windows-only end-user it doesn't.
Here, I fixed that for ya
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC
(LordHavoc)
-

frag.machine - Posts: 2090
- Joined: Sat Nov 25, 2006 1:49 pm
frag.machine wrote:mh wrote:frag.machine wrote:case-sensitive filesystem rocks.
Not if you're a Windows-only end-user it doesn't.
Here, I fixed that for ya
No, I've managed Unix servers with big production Oracle databases on them, and believe me, this does not rock. Waking up at 4 in the morning screaming is not a nice experience.
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
We knew the words, we knew the score, we knew what we were fighting for
-

mh - Posts: 2292
- Joined: Sat Jan 12, 2008 1:38 am
But why doesn't a case-sensitive filesystem not rock?mh wrote:No, I've managed Unix servers with big production Oracle databases on them, and believe me, this does not rock. Waking up at 4 in the morning screaming is not a nice experience.
Ken Thompson wrote:One of my most productive days was throwing away 1000 lines of code.
Get off my lawn!
-

dreadlorde - Posts: 268
- Joined: Tue Nov 24, 2009 2:20 am
I noticed the link went down.
Had it sitting in my downloads folder for a while now.
http://bfeared.com/library/index.php?di ... GLQFIX.zip
Had it sitting in my downloads folder for a while now.
http://bfeared.com/library/index.php?di ... GLQFIX.zip
-

Feared - Posts: 95
- Joined: Fri Jun 11, 2010 11:58 pm
- Location: Wylie, TX
25 posts
• Page 2 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 1 guest