Xeno69 / Domination

Domination - A MP mission for Arma 3
83 stars 36 forks source link

combat drone uses infantry viewdistance #449

Closed longtimegamer closed 1 year ago

longtimegamer commented 1 year ago

Infantry viewdistance is applied while flying a combat drone.

Steps to reproduce:

longtimegamer commented 1 year ago

@Xeno69 any suggestions to fix or troubleshoot?

Xeno69 commented 1 year ago

Yeah, but I'm not near my PC till tomorrow

Xeno69 commented 1 year ago

For now check here: https://github.com/Xeno69/Domination/blob/master/co30_Domination.Altis/client/fn_vdhandler.sqf

Xeno69 commented 1 year ago

Please check https://github.com/Xeno69/Domination/commit/5bc1ad915cd257c2e8eeac6742a8681e97f39752

longtimegamer commented 1 year ago

Found a bug here. Steps to reproduce:

Xeno69 commented 1 year ago

Mkay, will check in the next days.

Xeno69 commented 1 year ago

I have checked that now. The viewdistance doesn't change. inf vd is the same as before spawning the combat UAV.

longtimegamer commented 1 year ago

I am also using these settings:

d_InitialViewDistance = 1000; d_ViewdistanceChange = 2; // server sets, client may change later

EDIT: nevermind not relevant, the bug appears with default settings

longtimegamer commented 1 year ago

I am able to easily reproduce this bug. I edited the steps above in the top post. Please review.

Did you try with the combat UAV turret control? That step seems to cause the bug.

longtimegamer commented 1 year ago

It seems to set view distance here:

https://github.com/Xeno69/Domination/blob/master/co30_Domination.Altis/client/fn_uav_check.sqf#L30

the while loop exits when the player chooses "release UAV controls" but the viewdistance stays set at d_ViewDistanceAir

maybe after getConnectedUAV player returns null do:

if(_uav is a greyhawk) then { updated vd}

longtimegamer commented 1 year ago

I added a fix for review.

https://github.com/Xeno69/Domination/pull/469