Well, I keep saying it's fixed, and now I'm more sure, but I'm not yet really sure. I did re-write the navigation grid last night ( again ). This time I'm not using a 2d grid, but a std::set of navigation::nodes. This was designed to fix the over-under problem, which while not intended to be common in our game due to the mostly top-down view, it still can legitimately happen, like on the tower level.
In the process I cleaned up a couple of other aspects of it, and now I think it's actually a bit faster than before. It took me most of last night to get it back on track and making the A* work again. While looking through the code, I also cleaned up that a bit and made a couple of potential fixes.
So, now the pathfinding works again, and hopefully it will fix the tower level.
I have partially integrated the Novodex physics API into our codebase. The world is being cooked as a static collision mesh, and I put weapons in there as dynamic actors. In order to retain maximum control over character movement, I have kept our capsule collision code working for all sentient characters.
Novodex has a cool feature called Kinematic objects, which allows the characters to affect the world, but not get affected by other objects. This seems to work well so far.
I am having some tunneling problems right now on some of the smaller weapons, but I think I know what I need to do to fix them.
I was seeing a very strange problem on a couple of levels where part of the level would appear to fog out. It seemed to be happening on world tile boundaries, which was very strange. Each world tile is broken up into roughly 2000 triangles, for the sake of collision, culling and lightmap atlas creation. Why I would have one tile fogged and another one not fogged baffled me completely.
Here is a shot. Note the lower left bit of floor is not fogged, but the rest of the floor is :
I suspected the decal system might be to blame, so I put in some asserts and found out that some scorch mark decals had near-infinite bounding boxes. I was able to track this down to a problem when lasers hit something. I put in code to prevent lasers from hitting the guy that shot them, at least until they are reflected by a shield or something similar. That reminds me : I should make reflective materials also reflect lasers. It would be very cool to shoot around corners.
Anyway, this change created a flow control problem where I thought I hit an entity, but it turned out to be the dude that fired me, so I skip him, but keep going, with an infinite hit distance. Then I created a bounding box, and got all the tris in the box, which turned out to be the whole world tile. Then I mapped the texcoords, and they happened to end up near the texture center, which ended up looking gray.
Once I fixed that case to abort, the problem went away. Here is a shot of some creatures mercilessly hunting me down :