Crzyrndm / B9-PWings-Fork

Fork of Bac9's Procedural Wings mod for KSP
MIT License
26 stars 43 forks source link

Anomalous Mass With FAR #5

Closed PoDBoT closed 8 years ago

PoDBoT commented 8 years ago

If I install only this mod - everything is fine. If I also add FAR, the mass doubles (in simplest case), but, depending on the setting of strenght/mass and if vessel has many Pwing parts, in some cases, mass may even become negative (stock wings behaves normally). This problem occurs only in this fork, in the original B9 Aerospace mass seems to be behaving normally with FAR.

Reproduction on fresh KSP 1.0.5: 1)Install FAR and this mod (I used CKAN) 2)Go to SPH 3)Create new vessel consisting of one light part(I use FL-T100 Fuel Tank) 4)Attach B9 PW Procedural Wing to tank 5)Right click on wing and notice curWingMass, it has to be approximately 0.75 6)See in engineer`s report window that vessel mass is 1.5 tons

Wrong mass calculations affect CoM position, but I dont know, how it affect vessel in flight...

PoDBoT commented 8 years ago

Crzyrndm, please, explain to noob, what this code do? What is "GetModuleMass" method needed for?

public float GetModuleMass(float defaultMass)
{
    return part.mass - part.partInfo.partPrefab.mass;
}

I rebuild your project without this, and mass calculatios seems to be normal... I do this because original B9 Pwings code not conain this, but it already contains in FAR.

Crzyrndm commented 8 years ago

it's a interface that was added for stock support. Looks like it needs to return 0 for FAR though. Will fix

Crzyrndm commented 8 years ago

Fixed