TehGimp / KerbalMultiPlayer

A multiplayer plugin for KMP
http://sesau.ca/ksp/KMP.html
GNU General Public License v3.0
140 stars 53 forks source link

At KMPManager.cs line 2085, distance from KSC is the same for every landed vessel at login #263

Closed rekcon closed 10 years ago

rekcon commented 10 years ago

At KMPManager.cs line 2085, distance from KSC is the same for every landed vessel at login. I debugged this by adding the below debug prints:

KMPClientMain.DebugLog("Tried to load vessel too close to KSC"); KMPClientMain.DebugLog("Update Null and Kerbin: " + (update == null && update.bodyName == "Kerbin")); KMPClientMain.DebugLog("KSC Pos != 0: " + (kscPosition != Vector3d.zero)); KMPClientMain.DebugLog("Guid: " + (vessel_id)); KMPClientMain.DebugLog("Distance from KSC: " + (Vector3d.Distance(kscPosition, protovessel.position))); KMPClientMain.DebugLog("Distance < BUBBLE: " + (Vector3d.Distance(kscPosition, protovessel.position) < SAFETY_BUBBLE_DIAMETER));

Sample prints:

LOG 20:32:47.238] Guid: c8ef346b-d5ff-47bb-b653-ccc5bc8125e2 [LOG 20:32:47.239] Distance from KSC: 175.264041502908 [LOG 20:32:47.240] Distance < BUBBLE: True [LOG 20:32:47.241] vessel update applied [LOG 20:32:47.242] handleVesselUpdate done [LOG 20:32:47.243] handleVesselUpdate [LOG 20:32:47.243] vessel state: INACTIVE, tick=3076.95999999797, realTick=3111.84 [LOG 20:32:47.245] retrieving vessel: 0227a7c5-7351-4769-92c5-02d425b611ee [LOG 20:32:47.246] Adding new vessel: 0227a7c5-7351-4769-92c5-02d425b611ee [LOG 20:32:47.247] addRemoteVessel [LOG 20:32:47.248] Tried to load vessel too close to KSC [LOG 20:32:47.249] Update Null and Kerbin: False [LOG 20:32:47.250] KSC Pos != 0: True [LOG 20:32:47.250] Guid: 0227a7c5-7351-4769-92c5-02d425b611ee [LOG 20:32:47.251] Distance from KSC: 175.264041502908 [LOG 20:32:47.252] Distance < BUBBLE: True [LOG 20:32:47.253] vessel update applied [LOG 20:32:47.254] handleVesselUpdate done [LOG 20:32:47.255] handleVesselUpdate [LOG 20:32:47.256] vessel state: INACTIVE, tick=3076.63999999797, realTick=3111.84 [LOG 20:32:47.257] retrieving vessel: 302742fe-396e-44b1-8e59-6b97a33500b2 [LOG 20:32:47.258] Adding new vessel: 302742fe-396e-44b1-8e59-6b97a33500b2 [LOG 20:32:47.260] addRemoteVessel [LOG 20:32:47.260] Tried to load vessel too close to KSC [LOG 20:32:47.261] Update Null and Kerbin: False [LOG 20:32:47.262] KSC Pos != 0: True [LOG 20:32:47.263] Guid: 302742fe-396e-44b1-8e59-6b97a33500b2 [LOG 20:32:47.264] Distance from KSC: 175.264041502908 [LOG 20:32:47.265] Distance < BUBBLE: True [LOG 20:32:47.266] vessel update applied [LOG 20:32:47.267] handleVesselUpdate done [LOG 20:32:47.268] handleVesselUpdate [LOG 20:32:47.269] vessel state: INACTIVE, tick=3111.41999999794, realTick=3111.84 [LOG 20:32:47.270] retrieving vessel: 113c6646-4a0a-45af-a583-c91a4387f0d4 [LOG 20:32:47.271] Adding new vessel: 113c6646-4a0a-45af-a583-c91a4387f0d4 [LOG 20:32:47.272] addRemoteVessel [LOG 20:32:47.273] Tried to load vessel too close to KSC [LOG 20:32:47.274] Update Null and Kerbin: False [LOG 20:32:47.275] KSC Pos != 0: True [LOG 20:32:47.276] Guid: 113c6646-4a0a-45af-a583-c91a4387f0d4 [LOG 20:32:47.277] Distance from KSC: 175.264041502908 [LOG 20:32:47.278] Distance < BUBBLE: True [LOG 20:32:47.279] vessel update applied [LOG 20:32:47.280] handleVesselUpdate done

TehGimp commented 10 years ago

Fixed in https://github.com/TehGimp/KerbalMultiPlayer/commit/6b3571a5baf22562c4932d79152759ae8e4e732d