Problem with moons?

For test results, bug reports, announcements of new builds etc.

Moderators: winston, another_commander, Getafix

User avatar
Cmd. Cheyd
---- E L I T E ----
---- E L I T E ----
Posts: 934
Joined: Tue Dec 16, 2008 2:52 pm
Location: Deep Horizon Industries Manufacturing & Research Site somewhere in G8...

Post by Cmd. Cheyd »

Can someone confirm this for me?

Via Console:
1. Add a moon to ANY system.
2. Check system.planets[x].hasAtmosphere
*** This SHOULD return false and I believe will.
3. Run system.planets[x].texture = "<whatever texture you want.png>"
*** The moon should now appear with that texture.
4. Re-Check system.planets[x].hasAtmosphere
*** It should return false as before, but I believe will return TRUE.

If someone can confirm this, especially someone who doesn't run DH-Systems, it should indicate a core-bug.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

Checking now - will report back in a moment or three...

Editted to add - confirmed. Using System Redux 1.2 (Capt Kev's one) I take a moon it added (hasAtmosphere = false, texture = moon2.png) and "re-add" it's texture (S.planets[1].texture = "moon2.png") and hasAtmosphere has become true.

So I agree, adding the texture changes the atmosphere variable. It's a trunk bug.
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Post by Eric Walch »

I also think that things go wrong with the atmosphere, when looking at the code. In "setUpPlanetFromTexture", any old atmosphere is ditched and a new one is assigned. There probably is a check missing if the planet had an atmosphere in the first place. I also see that the function "setUpPlanetFromTexture" is only used by the JS system, making it a good candidate for this JS-only bug.

But I won't touch that part of the code. Others probably know immediately for sure if it will be an easy fix of excluding a few lines for moons.
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6626
Joined: Wed Feb 28, 2007 7:54 am

Post by another_commander »

What do you know, looks like it was a core code bug after all. Back to Testing and Bug Reports then.
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6626
Joined: Wed Feb 28, 2007 7:54 am

Post by another_commander »

Should be fixed in r3755/3756. Please check next nightly.
Post Reply