Page 2 of 2
Posted: Tue Jun 07, 2011 3:45 pm
by Baker
szo wrote:I'd prefer external_ents from QIP, though, because it is the first implementation (AFAIK)
Cvar names don't really matter too much, especially for what is mostly a developer feature. It is better to prefix server features with sv_ so the scope of cvar is known and understood (and the purpose of autocompleting cvars is to help you find the name of the cvar you can't remember
), but it isn't like that is universally applied either.
Posted: Tue Jun 07, 2011 9:16 pm
by mh
szo wrote:Baker wrote:(This is the solution to protect against loading wrong .lit files, isn't it).
Yes. I use the same mechanism for the lit files, too.
For Fitz and derivatives it's probably no harm to change "if (data)" to "if (data && com_filesize == l->filelen * 3 +
" - with both checks you can be more certain that you've got the correct LIT file.
You also need to surround that block with a Hunk_LowMark/Hunk_FreeToLowMark (which I note QS has already done).
Posted: Tue Jun 07, 2011 9:29 pm
by szo
mh wrote:szo wrote:Baker wrote:(This is the solution to protect against loading wrong .lit files, isn't it).
Yes. I use the same mechanism for the lit files, too.
For Fitz and derivatives it's probably no harm to change "if (data)" to "if (data && com_filesize == l->filelen * 3 +
" - with both checks you can be more certain that you've got the correct LIT file.
Can that be a problem if a dev has an unlit map and threw in a lit file? (Surely an ultra low-probability stupid corner case and most probably, if not ever, won't happen in real life...)
Posted: Tue Jun 07, 2011 9:41 pm
by mh
szo wrote:mh wrote:szo wrote:
Yes. I use the same mechanism for the lit files, too.
For Fitz and derivatives it's probably no harm to change "if (data)" to "if (data && com_filesize == l->filelen * 3 +
" - with both checks you can be more certain that you've got the correct LIT file.
Can that be a problem if a dev has an unlit map and threw in a lit file? (Surely an ultra low-probability stupid corner case and most probably, if not ever, won't happen in real life...)
I believe the surface offsets would all be either 0 or -1 in that case (0 I'm pretty sure, but would need to check the QBSP source).