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.szo wrote:I'd prefer external_ents from QIP, though, because it is the first implementation (AFAIK)
Loading External .Ent Files
The night is young. How else can I annoy the world before sunsrise? Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
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.szo wrote:Yes. I use the same mechanism for the lit files, too.Baker wrote:(This is the solution to protect against loading wrong .lit files, isn't it).
You also need to surround that block with a Hunk_LowMark/Hunk_FreeToLowMark (which I note QS has already done).
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
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...)mh wrote: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.szo wrote:Yes. I use the same mechanism for the lit files, too.Baker wrote:(This is the solution to protect against loading wrong .lit files, isn't it).
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).szo wrote: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...)mh wrote: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.szo wrote: Yes. I use the same mechanism for the lit files, too.
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