#include "multiplay.hxx"
-SG_USING_STD(string);
+using std::string;
// These constants are provided so that the ident command can list file versions.
SGPropertyNode* root = globals->get_props();
/// Build up the id to property map
- unsigned i = 0;
- while (FGMultiplayMgr::sIdPropertyList[i].name) {
+
+ for (unsigned i = 0; i < FGMultiplayMgr::numProperties; ++i) {
const char* name = FGMultiplayMgr::sIdPropertyList[i].name;
SGPropertyNode* pNode = root->getNode(name);
if (pNode)
mPropertyMap[FGMultiplayMgr::sIdPropertyList[i].id] = pNode;
- ++i;
}
return is_enabled();
* or receive data over the network
******************************************************************/
bool FGMultiplay::process() {
-
+ using namespace simgear;
if (get_direction() == SG_IO_OUT) {
// check if we have left initialization phase. That will not provide
pData->type = it->second->getType();
switch (pData->type) {
- case SGPropertyNode::INT:
- case SGPropertyNode::LONG:
- case SGPropertyNode::BOOL:
+ case props::INT:
+ case props::LONG:
+ case props::BOOL:
pData->int_value = it->second->getIntValue();
break;
- case SGPropertyNode::FLOAT:
- case SGPropertyNode::DOUBLE:
+ case props::FLOAT:
+ case props::DOUBLE:
pData->float_value = it->second->getFloatValue();
break;
- case SGPropertyNode::STRING:
- case SGPropertyNode::UNSPECIFIED:
+ case props::STRING:
+ case props::UNSPECIFIED:
{
// FIXME: We assume unspecified are strings for the moment.