c172p-team / c172p

A high detailed version of the Cessna 172P aircraft for FlightGear
GNU General Public License v2.0
82 stars 43 forks source link

External views break when switching airports. #1374

Closed Megaf closed 3 years ago

Megaf commented 3 years ago

External views, such as Helicopter View and others, break when you use Select Airport in sim, to go to a different airport. Might be related to #1373

Video showing the issue. https://www.youtube.com/watch?v=5acOygRYRUg Or, if you prefer, on Odysee. https://odysee.com/FlightGear_Camera_Bug_Demonstration

wkitty42 commented 3 years ago

On 7/4/21 3:59 PM, Megaf wrote:

External views, such as Helicopter View and others, break when you use Select Airport in sim, to go to a different airport.

it is broken with other craft? try it with the UFO... if is it broken there, then i suspect it is a core breakage...

Megaf commented 3 years ago

C172 specific.

On 4 July 2021 21:57:54 GMT+01:00, waldo kitty @.***> wrote:

On 7/4/21 3:59 PM, Megaf wrote:

External views, such as Helicopter View and others, break when you use Select Airport in sim, to go to a different airport.

it is broken with other craft? try it with the UFO... if is it broken there, then i suspect it is a core breakage...

-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/c172p-team/c172p/issues/1374#issuecomment-873661227

wlbragg commented 3 years ago

Same issue. When you switch to the external view the flag /sim/current-view/can-change-z-offset is set to true. Then when you do a relocation the c172p-mice.set code loads and is allowed to execute because the condition is true. We need tb find a flag that can condition the c172p-mice.set code to not execute in the event of a relocation .The other question is, exactly why was this c172p-mice.set code created? For now don't relocate to another airport unless your in interior view.

wlbragg commented 3 years ago

@Megaf You can comment out line 1184 in c172p-main.xml

        <!--mice include="c172p-mice.xml"/-->

~and eliminate both issues at the same time.~ I don't know what other issue it might create, but maybe you will notice and can let me know what it is that that code is doing. Hum, that didn't fix this second issue. So I need to dig some more.

wlbragg commented 3 years ago

Ok, this one is on me, it's the seat view code. I'll see if I can get it sorted out. No need to comment out the code mentioned above. I have a fix for that I will push after some discussion as to why the original logic didn't work.

wlbragg commented 3 years ago

@Megaf this is corrected and awaiting @legoboyvdlp to test and merge.

Megaf commented 3 years ago

Thanks, @wkitty42 and @wlbragg helping with the investigation and quick actions.

Megaf commented 3 years ago

Fixed.