• New Horizons on Maelstrom
    Maelstrom New Horizons


    Visit our website www.piratehorizons.com to quickly find download links for the newest versions of our New Horizons mods Beyond New Horizons and Maelstrom New Horizons!

Cannot Confirm 3D Sailing Mode: Game Randomly Locks Up, Have to Force Quit

That explains NK's comment. It was stock game code that looked very strange to him.
And for good reason! :shock
 
@pedrwyth, while you at this, can you please check if this:

Code:
    // clear some of group attributes
    for (i=0; i<MAX_SHIP_GROUPS; i++)
    {
        rGroup = Group_GetGroupByIndex(i);
        if (CheckAttribute(rGroup, "AlreadyLoaded")) DeleteAttribute(rGroup, "AlreadyLoaded");
    }
is already present in the stock code earlier in this function?
 
@pedrwyth, while you at this, can you please check if this:

Code:
    // clear some of group attributes
    for (i=0; i<MAX_SHIP_GROUPS; i++)
    {
        rGroup = Group_GetGroupByIndex(i);
        if (CheckAttribute(rGroup, "AlreadyLoaded")) DeleteAttribute(rGroup, "AlreadyLoaded");
    }
is already present in the stock code earlier in this function?

Sure is but has been "tidied" again since

Code:
// clear some of group attributes
        for (i=0; i<MAX_SHIP_GROUPS; i++)
        {
            rGroup = Group_GetGroupByIndex(i);
            if (CheckAttribute(rGroup, "AlreadyLoaded")) { DeleteAttribute(rGroup, "AlreadyLoaded"); }
        }

Looks like another case of WIP stock code!:oops:
 
Thanks. That earlier removal of ‘AlreadyLoaded’ attribute might be the reason why our „HUH” line doesn't really cause any problems. Although there is still a lot of code in between, so it's hard to tell whether that line ever gets executed without some tracing.
 
Thanks. That earlier removal of ‘AlreadyLoaded’ attribute might be the reason why our „HUH” line doesn't really cause any problems. Although there is still a lot of code in between, so it's hard to tell whether that line ever gets executed without some tracing.
Removing something that isn't there, only if it actually isn't there, should not cause any troubles.
So we can remove those "huh"-marked lines or not. Either way, it should not matter at all so it's not worth worrying about. :shrug
 
I would suggest commenting them out, instead of outright removing them. It could very well be a left over bit of code for a process that was changed or deleted entirely. I think there was a couple of similar things like that early on, but that was so long ago I do not remember for sure. As many changes as this game saw in development, I am surprised there haven't been a whole lot more of issues like this one.
 
I still suspect it was supposed to remove the attribute when it's present, not when it's not. If that is the case, this code never worked as intended, at least not since the release of the stock game.
Right now I'd, indeed, commented it out. Maybe adding a reference to this thread to the comment.
 
I'm inclined to not touch it. It isn't related to any issues. "Don't fix what isn't broken" springs to mind. :shrug
 
Well, that line was (most likely) proudly doing nothing for a decade, it can wait another decade before fixing/removal. Still, I would add some kind of a remainder comment to that "HUH?!", or we (or someone else) are bound to have the same discussion all over again in a couple of years ;)
 
A lot has changed since this report, so I'm marking it as "Cannot Confirm" until I hear otherwise.

I did change the "HUH!?" comment to "Stock game code that removes an attribute that is already not there" to make it somewhat less confusing for future modders.
 
Back
Top