Fixed another multiple star system bug related to sharing of StarDetails objects.
Some stars without orbit barycenters could end up (incorrectly) getting assigned a barycenter.ver1_5_1
parent
baae4530f7
commit
7a5c9ed95c
|
@ -1062,11 +1062,14 @@ void Star::setLuminosity(float lum)
|
|||
|
||||
void Star::setDetails(StarDetails* sd)
|
||||
{
|
||||
// TODO: delete existing details if they aren't shared
|
||||
details = sd;
|
||||
}
|
||||
|
||||
void Star::setOrbitBarycenter(Star* s)
|
||||
{
|
||||
if (details->shared())
|
||||
details = new StarDetails(*details);
|
||||
details->setOrbitBarycenter(s);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue