Planetfall bug or feature?

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: another_commander, winston

Post Reply
User avatar
wackyman465
---- E L I T E ----
---- E L I T E ----
Posts: 831
Joined: Thu Nov 06, 2008 10:15 pm
Location: Currently hunting you down in an Imperial Courier

Planetfall bug or feature?

Post by wackyman465 »

It appears I can land on the sun. I didn't try but I got the landing clearance message while sunskimming...
I shot him back first. That is to say, I read his mind and fired before he would have fired on me. No, sir, he wasn't a fugitive.

User avatar
Thargoid
Thargoid
Thargoid
Posts: 5510
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

It's a bug if it happens, although there is (or at least should be) code in place to recognise the sun and suppress the message.

What Oolite version, OS and and Planetfall version are you running?

User avatar
wackyman465
---- E L I T E ----
---- E L I T E ----
Posts: 831
Joined: Thu Nov 06, 2008 10:15 pm
Location: Currently hunting you down in an Imperial Courier

Post by wackyman465 »

trunk, OSX 10.5.8, planetfall 1.12
I shot him back first. That is to say, I read his mind and fired before he would have fired on me. No, sir, he wasn't a fugitive.

User avatar
Thargoid
Thargoid
Thargoid
Posts: 5510
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

Try 1.2 that I uploaded yesterday, that works better with 1.73.

I checked the code and there are checks for !isSun before all communications, so it may possibly be something broken in trunk, as it doesn't do this on 1.72.2 on my machine. I will check on 1.73 when I get some time.

As a side-note, please indicate you're using trunk when reporting possible OXP bugs - it sometimes can save a lot of hassle when the problem is in the trunk rather than the OXP.

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 »

Thargoid wrote:It's a bug if it happens, although there is (or at least should be) code in place to recognise the sun and suppress the message.

What Oolite version, OS and and Planetfall version are you running?
I think it is your check:

Code: Select all

if(!planet.isSun && !planet.hasOwnProperty("solarGasGiant"))
You probably mend:

Code: Select all

if(!(planet.isSun || planet.hasOwnProperty("solarGasGiant")))
You nowhere in your code define solarGasGiant so currently the check always fails.
Last edited by Eric Walch on Fri Aug 28, 2009 4:33 pm, edited 1 time in total.

User avatar
Thargoid
Thargoid
Thargoid
Posts: 5510
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

If planet is a regular planet:

if(!planet.isSun && !planet.hasOwnProperty("solarGasGiant")) = true [if (!false && !false) = if (true && true) = if (true)]

if planet is a sun:

if(!planet.isSun && !planet.hasOwnProperty("solarGasGiant")) = false [if (!true && !false) = if (false && true) = if (false) ]

if planet is a gas giant:

if(!planet.isSun && !planet.hasOwnProperty("solarGasGiant")) = false [if (!false && !true) = if (true && false) = if (false) ]

if planet is a gas giant sun:

if(!planet.isSun && !planet.hasOwnProperty("solarGasGiant")) = false [(if !true && !true) = if (false && false) = if (false) ]

I think if you work out the logic the two statements above are actually the same, although yours is clearer than mine.


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 »

Thargoid wrote:I think if you work out the logic the two statements above are actually the same, although yours is clearer than mine.
After writing it down I already had my doubts.You are right, they are the same. I was probably to convinced the cause must lie in this line.

User avatar
Thargoid
Thargoid
Thargoid
Posts: 5510
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

Just tested isSun (working correctly), and also Planetfall 1.2 (also working correctly under WinXP).

So can you describe in exact detail how you got your problem to occur Wacky?

User avatar
wackyman465
---- E L I T E ----
---- E L I T E ----
Posts: 831
Joined: Thu Nov 06, 2008 10:15 pm
Location: Currently hunting you down in an Imperial Courier

Post by wackyman465 »

Erm flew way to close to the sun while skimming as I was carrying 50 tc of narcotics on a transport mission.
I shot him back first. That is to say, I read his mind and fired before he would have fired on me. No, sir, he wasn't a fugitive.

User avatar
Thargoid
Thargoid
Thargoid
Posts: 5510
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

I was meaning which system you were in, whether you have any system modifying OXPs (system redux, orbits, farsun etc) in place and *ahem* useful things like that.

I can't replicate your problem on my trunk WinXP using PF 1.2 (and the sun test code hasn't changed there from 1.12), and neither can Eric on his Mac as he kindly tested it for me as a back-up that it wasn't a Mac thing.

User avatar
wackyman465
---- E L I T E ----
---- E L I T E ----
Posts: 831
Joined: Thu Nov 06, 2008 10:15 pm
Location: Currently hunting you down in an Imperial Courier

Post by wackyman465 »

Um I forget what system it was in, but it's happened in a few, and I am using system redux but not farsun.
I shot him back first. That is to say, I read his mind and fired before he would have fired on me. No, sir, he wasn't a fugitive.

Post Reply