Fixed issues related to overwriting values in POSI commands.

- Added global position drefs for multiplayer aircraft.
 - Added checks for the "don't change" sentinel value to SetPosition, SetOrientation and SetFlaps.
 - Reordered validation checks in SetGear to be consistent with the above methods.
 - Removed some now redundant "don't change" value checks in the MessageHandlers class.
This commit is contained in:
Jason Watkins
2015-04-30 08:46:29 -07:00
parent cde91d84c9
commit 39c2f58a54
2 changed files with 83 additions and 56 deletions

View File

@@ -297,9 +297,9 @@ namespace XPC
{
float orient[3]
{
values[i][1] == -998 ? DataManager::GetFloat(DREF::Pitch) : values[i][1],
values[i][2] == -998 ? DataManager::GetFloat(DREF::Roll) : values[i][2],
values[i][3] == -998 ? DataManager::GetFloat(DREF::HeadingTrue) : values[i][3]
values[i][1],
values[i][2],
values[i][3]
};
DataManager::SetOrientation(orient);
break;
@@ -327,9 +327,9 @@ namespace XPC
{
float pos[3]
{
values[i][2] == -998 ? DataManager::GetFloat(DREF::Latitude) : values[i][2],
values[i][3] == -998 ? DataManager::GetFloat(DREF::Longitude) : values[i][3],
values[i][4] == -998 ? DataManager::GetFloat(DREF::AGL) : values[i][4]
values[i][2],
values[i][3],
values[i][4]
};
DataManager::SetPosition(pos);
break;