Originally posted by Bobboau
and that's part of the reason it's so ugly, there isn't simply a block somewere that says
/*start turret code*/
...
/*end turret code*/
it's all snaked into the subsystem code and the AI code and the model hierarchy handeling code and the weapon code and the ship code and the high level object handeling code the parseing code and... you get the point yet?
if anyone were to try to rip it out they'd likely remove some large chuncks of other vital organs as well
I have a very limited knowledge of c++ (and it's something of many years ago), nonetheless I thought it wouldn't be difficult even for me to add small things like for example what argv did for virtual shields...
I opened (an year ago I think) cvs and started reading some code looking expecially for shields, turrett targeting etc....
I closed it after 10 minutes.
Admittedly I never looked at a code of this complexity before (nor I had the skills to), but what really scared me is the way it is organized.....or better, the way it ISN'T organized:p
Bob is right, what makes a proposed change easy or hard to do, is how many other parts of code this change will affect rather than its complexity. And you can't simply say "it is a mess? then rewrite it!", because you have tons of values that will be used in other parts of the code, and that you will have to track if you want it to work. If you want to re-organize the code, you would probably have to rewrite almost all the game.
Sometimes we propose changes that look very easy, we express them in a logic way, like an algorythm, that sound simple and easy, but

they aren't easy nor simple.
In this case, we know for example that the game already check if an object is visible or occluded when targeting (an occluded object has a different reticle).
I remember I thought that if it already check if a subobject is occluded or not, probably it should be easy to have the engine check if a turret's target is occluded or not, and then you will just have to don't make a turrett firing if it's target is occluded.
Even not considering eventual performance hits, this sound trival, easy, simple...as easy or simple or just attractive sound many other proposed solutions....
But if they have not been implemented before, well it means that they are nor simple nor easy:)
A change in the turrett code will require a lot of time, and a lot of time in debugging too, and with all the coders looking for HT&L, I think we will not see it in short time; nonethless, I hope to see this one day or the other, just bear in mind that it can't happen soon