View Single Post
  #11  
Old 11-29-2007, 03:28 PM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default

Quote:
Originally Posted by KLS View Post
Do you have any idea where the crash in question occurs in the code?

Corrupt or not there's probably safe-checks that can be put in place to prevent it if we know where it's at.
Hi KLS,

No crashes occur because I copied the check from:

bool Map::LineIntersectsNode( NodeRef node_r, VERTEX p1, VERTEX p2, VERTEX *result, FACE **on)

which is called by the LOS checking code

Code:
  unsigned long *cfl = mFaceLists + _node->faces.offset;

        for(i = 0; i < _node->faces.count; i++) {
                if(*cfl > m_Faces)
                        continue;       //watch for invalid lists, they seem to happen
The if(*cfl > m_Faces) checks for the corrupt data that I saw in the eastwastes.map file. I assume this check was put in by FNW when that code was written.

I put the same check in the FindBestZ code to avoid the crash there, so there is nothing else required (other than maybe fixing the program that generates the .map files (azone?).
Reply With Quote