.lit files and duplicate map names
Moderator: InsideQC Admins
3 posts
• Page 1 of 1
.lit files and duplicate map names
/any_mod/maps/start.bsp will find /id/maps/start.lit and load the sucker, if it doesn't have it's own .lit. Not pretty.
This can happen for any maps with duplicate names. A lot of mods have custom start maps, so that's probably the most common.
Fix options:
1. Check that the absolute paths of the .bsp and .lit match. A bit of work, model_t only stores relative paths.
2. Compare .lit file size to lightdata (the standard lighting). The .lit file size is lightdata * 3 + 8. Doubles as an integrity check.
Similar 'add-on' files types like .ent may have the same issue.
This can happen for any maps with duplicate names. A lot of mods have custom start maps, so that's probably the most common.
Fix options:
1. Check that the absolute paths of the .bsp and .lit match. A bit of work, model_t only stores relative paths.
2. Compare .lit file size to lightdata (the standard lighting). The .lit file size is lightdata * 3 + 8. Doubles as an integrity check.
Similar 'add-on' files types like .ent may have the same issue.
-
qbism - Posts: 1236
- Joined: Thu Nov 04, 2004 5:51 am
Re: .lit files and duplicate map names
qbism wrote:2. Compare .lit file size to lightdata (the standard lighting). The .lit file size is lightdata * 3 + 8. Doubles as an integrity check.
I thought that for engoo but forgot to implement it in my nov 2010 code frenzy feature creep craze. Should be done for every engine
.ent might need a worldspawn check
i should not be here
- leileilol
- Posts: 2783
- Joined: Fri Oct 15, 2004 3:23 am
Re: .lit files and duplicate map names
I've been doing option 2 almost since time began; it works, it's fast and easy, and there's no messy code involved.
Option 1 will break if the LIT file is intended to be valid (e.g. LIT files for id1 in a gamedir). Highly unlikely, but it's still a break case.
Option 1 will break if the LIT file is intended to be valid (e.g. LIT files for id1 in a gamedir). Highly unlikely, but it's still a break case.
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
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest