pioneerspacesim/pioneer — pull request #2223 by johnbartholomew (2013-04-20 18:19:23+00:00)
Title: Avoid virtual setters during Load/initialisation

Fixes #2221.

Load/Init should only be setting up state, whereas virtual setters are often overriden in derived classes to trigger things on particular state changes (e.g., put a message in the ship console when the ship alert state changes). Load/Init is not a state change, because there's no (valid) previous state.

#2221 was caused by Body::Load and Ship::Load calling virtual setters which failed because object initialisation (e.g., setting the ship's model, or setting up the ship console message log) hadn't finished.