Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
First part of removing states from models #125
Hmm, for some reason, characters are now slightly transparent in your branch.
This is noticable, for example, on the hair of Bim in the NWN OC Prelude. And in Chapter 2, on, for example, Linu:
(Left is your branch, right xoreos/master)
It could be related to the environment mapping on her armor. Or maybe not, since it happens on heads, too (just not this noticable, for the most part).
Hmm, while checking your branch for leaks, I found something "interesting":
There's apparently at least two animations with the same name in at least one model. The model in question is "PLC_H09", the animation name is "die", and the model shows up in the entry area of the Chapter 1 of the NWN OC. I think it might be the mat on the ground where the infected lie, or maybe the infected themselves.
Here is a small patch against your branch that spits out a warning (and also for duplicate states). That also takes care of the memory leak, I think (because std::map::insert() won't overwrite a value, we're basically allocating the extra Animation and then throwing it away without delete'ing it; the patch just bails before allocating the Animation).
I'm not really sure how to handle this. Which of the two animations is the real one? Are the different, even? Does it matter?
(I probably should have added a check there earlier, too. I just didn't think that this could happen, but, well, BioWare. :P)
This is also not necessarily related to your PR as such, but somewhat connected. I'm mainly just thinking out loud here, because it might interest you and so I'm not forgetting this. And maybe someone wants to chime in and/or research this further. :)