Join us at the Oolite Anniversary Party -- London, 7th July 2024, 1pm
More details in this thread.

this.shipEnteredPlanetaryVicinity not firing in trunk 5348?

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

Moderators: another_commander, winston, Getafix

Post Reply
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5525
Joined: Thu Jun 12, 2008 6:55 pm

this.shipEnteredPlanetaryVicinity not firing in trunk 5348?

Post by Thargoid »

It looks to me that as of at least rev 5348 the this.shipEnteredPlanetaryVicinity function isn't firing (under Windows).

Can someone please check and confirm, and if true look at a repair?
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Re: this.shipEnteredPlanetaryVicinity not firing in trunk 53

Post by Eric Walch »

Kaks made some changes recently. In the process something must have gone wrong. Its a bit of a complex sets of tests, so any change is likely to break things. :)

On my computer there always fire handlers when changing aegis, so it was easy to check. The first two seemed to show everything was okay.

Code: Select all

[eric's test handlers]: Player launched from station: Dodecahedron Mayan Station
[eric's test handlers]: Player leaves station eagis: Dodecahedron Mayan Station
[eric's test handlers]: Player leaves aegis of planet with radius: 33910
[eric's test handlers]: Player enters station aegis: Dodecahedron Mayan Station
[eric's test handlers]: Player enters aegis of planet with radius: 33910
On the next one things already seamed weird as I thought I was far enough from the station so the planet should trigger first.

Code: Select all

[eric's test handlers]: Player leaves station eagis: Dodecahedron Mayan Station
[eric's test handlers]: Player leaves aegis of planet with radius: 33910
[eric's test handlers]: Player enters station aegis: Dodecahedron Mayan Station
[eric's test handlers]: Player enters aegis of planet with radius: 33910
Than I decided to enter the aegis at a spot away from the station. And indeed. I almost crashed into the planet but no aegis message. Apparently the planetary aegis only triggers when being already in the station aegis.:

Code: Select all

[eric's test handlers]: Player leaves station eagis: Dodecahedron Mayan Station
[eric's test handlers]: Player leaves aegis of planet with radius: 33910
******* missing response here when almost touching the surface.
That probably also means that traders will fly to the planet itself :lol:
User avatar
Kaks
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 3009
Joined: Mon Jan 21, 2008 11:41 pm
Location: The Big Smoke

Re: this.shipEnteredPlanetaryVicinity not firing in trunk 53

Post by Kaks »

Oopsadaisy! :roll:
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: this.shipEnteredPlanetaryVicinity not firing in trunk 53

Post by cim »

Probably fixed in r5444. At least, I think I've checked all the relevant cases...
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5525
Joined: Thu Jun 12, 2008 6:55 pm

Re: this.shipEnteredPlanetaryVicinity not firing in trunk 53

Post by Thargoid »

Thanks, but it's still not quite right (it fires on exiting vicinity too, and Planetfall now crashes to desktop just after the docking rings when you "land"). I've PM'd you more details.
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: this.shipEnteredPlanetaryVicinity not firing in trunk 53

Post by cim »

Thargoid wrote:
Thanks, but it's still not quite right (it fires on exiting vicinity too, and Planetfall now crashes to desktop just after the docking rings when you "land"). I've PM'd you more details.
I can't get it to trigger on exiting planetary vicinity (except in the case where at the same time I'm entering a different planet's vicinity, of course). Is there any particular combination of actions you're taking?

Planetfall crash. There are two bugs here. Essentially the problem is that the planetfall station's virtual dock is too large and too close to the surface, so the station collides with the planet (destroying it) as the player is trying to dock. This is (in trunk...) a bug in PF

The easiest solution to the immediate problem (and one that is 1.76 compatible) is probably to move the planetfall station a few hundred metres higher above the planet's surface and/or make its virtual dock much smaller, and then use station.dockPlayer() rather than relying on the player actually intersecting the dock volume.

Meanwhile, there's an Oolite core bug this has exposed in that if the station is destroyed between shipWillDockWithStation and shipDockedWithStation there is a crash. I'll fix that (but the fix will stop the crash, not make PF work again). EDIT: fixed in r5447.
Last edited by cim on Sat Oct 27, 2012 12:48 pm, edited 1 time in total.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5525
Joined: Thu Jun 12, 2008 6:55 pm

Re: this.shipEnteredPlanetaryVicinity not firing in trunk 53

Post by Thargoid »

In the v1.51 of the OXP I'm working on I already use dockPlayer to do the docking. I'll try shrinking the virtual dock and see if I can get it working that way.

No worries about 1.76 compatibility - I'm going to make the new version 1.77 only when it comes out - the old version will be fine until then.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5525
Joined: Thu Jun 12, 2008 6:55 pm

Re: this.shipEnteredPlanetaryVicinity not firing in trunk 53

Post by Thargoid »

OK, and with a newly defined dock (just a copy of your one from the trunk shipdata.plist) and still using the dockPlayer it is now working fine again :)

I'm still getting an odd effect if the selector picks the external OXP choice (the one with the low chance as a built-in role), but generally things are working aside from that. No more CTD anyway :D.
Post Reply