Standalone md5 model support#765
Conversation
|
I @NHogweed, thanks for this. Now, the code around the selection of which model to load it getting too messy for my taste, especially with the No need to touble yourself further though, I'll take care of the rest from this. |
|
OK. I'm keeping my code until that though, just for any case. |
|
Hi @NHogweed finally I merged your modification as-is. I wanted to be pedantic at first and redo this, but hey, I'm lacking time and as we say home : "le mieux est l'ennemi du bien" or if you prefer here Practicality beats Purity :) Seriously though, your change was not that big, and is still easy enough to follow. Thanks for your contribution ! |
|
I think it would be better for compatibility (at least with FTEQW and QSS) purposes to revert my changes to |
|
Please provide another PR, because I don't see how the changes you mention could work and still be compatible with the if (r_loadmd5models.value) {
...
}branch ? |
|
I think the previous We must keep the automatic override / standalone support irrespective of the real QuakeC name, else we loose the ability to use MD5 models packs simply. Right, I think we can have both override and explicit MD5, I'll do something about it. |
This is not what I saw after its compilation.
Just tried RME for hipnotic, and it worked as usual.
Really? As far as I understand, I fail to see what is wrong with the new version of standalone md5 loading code, unless you think it is important to keep the older one. But even then, they can be combined. |
Can't be, the MD5 of this package are invalid, ( andrei-drexler/ironwail#356 (comment) ) unless you have a particular version ? Now for the code, I think you are right: The switch(mod_type) is used to dispatch to the appropriate loader but indeed Following that logic, you proposed change should bring MD5 standalone support. The previous code That's how I tested your change using Q2M (#761) but this is not a valid situation, obviously the .mdl is supposed to be present if specified in QuakeC ! and the same thing applies for MD5. |
I removed problematic models (proxbomb and wetsuit). Everything else worked fine. (UPD: well, actually there are 3 more models with broken anim files.)
Maybe it's a good idea to rename md5-related cvars too? If you want to see the md5 option from |
|
Thanks for your test example it works !
Yes
Now if we provide MD5-only models, the Remaster / Classic setting makes no difference, as intended. |
Now, if there is a md5 model, but no mdl with the same name, the engine will use the former instead of returning an error. This ignores r_loadmd5models and r_md5models.