|
Post by MaxED on May 7, 2019 19:39:16 GMT -5
Except, this extra entry is not added to nfiles:
nfiles++; // add space for a guard *numfiles = nfiles;
list = malloc( sizeof( char * ) * nfiles ); memset( list, 0, sizeof( char * ) * nfiles );
s = Sys_FindFirst( findname, musthave, canthave ); nfiles = 0; // <-- mxd. Le reset!
|
|
|
Post by MaxED on May 7, 2019 19:56:58 GMT -5
Con_Print(): text coloring sequences should not count towards the word length. Con_Print(): text coloring sequences are lost when word wrapping.
|
|
|
Post by knightmare on May 7, 2019 21:24:29 GMT -5
Um, you missed the obvious right after that line:
nfiles++; // add space for a guard- this is a null terminator. *numfiles = nfiles; // This sets the int var passed by pointer. Further changes to nfiles will not be seen by the calling function.
Further, I compared the output of FS_Path_f(), and it's not missing any paks or pk3s in baseq2 or any game dir I've tried.
|
|
|
Post by MaxED on May 8, 2019 15:51:40 GMT -5
My bad... For whatever reason I mistook
*numfiles = nfiles; for
numfiles = &nfiles;
Yet another issue: "Disable Alt-tab" logic doesn't work (at least, not on my PC). 1. According to the documentation, WM_HOTKEY message is supposed to be handled by GetMessage(), not MainWndProc(). 2. On my system, RegisterHotKey(0, 0, MOD_ALT, VK_TAB) always fails with ERROR_HOTKEY_ALREADY_REGISTERED, regardless of hWnd / id used.
RegisterHotKey(0, 0, MOD_ALT, VK_RETURN) works fine, so my guess is that ability to disable Alt-Tab is explicitly disabled by the OS (Win7 in my case).
|
|
|
Post by knightmare on May 8, 2019 17:44:21 GMT -5
The disable Alt-tab function works perfectly on my Windows 7 system.
Did you by chance, rename the KMQuake2 .exe? The Windows registry has compatibility hacks that disable some key functions based on .exe name.
|
|
|
Post by MaxED on May 8, 2019 20:59:52 GMT -5
Curious... On my system, Alt-Tab is reserved by explorer.exe. If I terminate it, then launch KMQuake2 (regardless of filename), Alt-Tab is blocked, otherwise, it isn't.
|
|
|
Post by MaxED on May 16, 2019 3:26:30 GMT -5
Is it me, or Com_PageInMemory() doesn't do anything useful, even in vanilla Q2?
|
|
|
Post by knightmare on May 16, 2019 11:18:00 GMT -5
It traverses the passed buffer, thus forcing it all into RAM, and is used in snd_dma.c->S_EndRegistration() to make sure all sounds are not paged out, which would cause lag, sound popping, or worse.
Not an issue any more on modern systems, but on contemporary min-spec hardware (16MB) it was likely quite necessary.
|
|
|
Post by MaxED on May 16, 2019 14:35:56 GMT -5
Would've never guessed that myself. Thanks for the explanation!
|
|
|
Post by MaxED on May 21, 2019 18:46:29 GMT -5
As I found out, Com_HashFileName() is not particularly reliable. For example, it returns the same hash for "textures/e1u1/alarm2_glow" and "models/items/enviro/skin"...
|
|
|
Post by knightmare on May 21, 2019 19:43:36 GMT -5
It's pretty much the same hash used in Quake3's filesystem, used for putting items in a pk3 into hash tables/buckets.
Still plenty good enough to speed up binary pak searches.
|
|
|
Post by MaxED on May 27, 2019 16:02:55 GMT -5
Out of curiosity: why self->solid was changed from SOLID_NOT to SOLID_TRIGGER in ThrowGib(), ThrowHead() and ThrowClientHead()?
|
|
|
Post by MaxED on May 27, 2019 16:44:32 GMT -5
void target_explosion_explode (edict_t *self) { float save;
gi.WriteByte (svc_temp_entity); if (self->spawnflags & 1) //Knightmare- big explosion gi.WriteByte (TE_EXPLOSION1_BIG); else gi.WriteByte (TE_EXPLOSION1); gi.WritePosition (self->s.origin); gi.multicast (self->s.origin, MULTICAST_PHS);
if(level.num_reflectors) ReflectExplosion (TE_EXPLOSION1,self->s.origin); // <- doesn't take spawnflags into account.
... }
|
|
|
Post by MaxED on May 27, 2019 17:34:53 GMT -5
Found in Cvar_BitInfo():
// FS: Exploit. Making a userinfo key (or value) longer than 63 chars (i.e. setting name longer than this) // will actually delete the key possibly having checks elsewhere in the code turn up NULL // So let's truncate it. Info_SetValueForKey checks new key / value length before clearing the key.
Also, Info_SetValueForKey accesses value before checking if it exists.
|
|
|
Post by knightmare on May 27, 2019 19:17:37 GMT -5
Out of curiosity: why self->solid was changed from SOLID_NOT to SOLID_TRIGGER in ThrowGib(), ThrowHead() and ThrowClientHead()? Probably to allow gibs to bounce properly. Try out DM with the mega_gibs cvar enabled to see this.
|
|