Skip to content

Commit

Permalink
fix missing variable assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
dallongo committed May 12, 2016
1 parent a61343e commit 878e038
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Source/rFactorSharedMemoryMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ void SharedMemoryMapPlugin::UpdateTelemetry( const TelemInfoV2 &info ) {
oriX.y = oriY.y * cosf(wRot.x * cDelta) - oriY.z * sinf(wRot.x * cDelta);
oriX.z = oriY.y * sinf(wRot.x * cDelta) + oriY.z * cosf(wRot.x * cDelta);
oriXlen = sqrtf(oriX.x * oriX.x + oriX.y * oriX.y + oriX.z * oriX.z);
pBuf->vehicle[i].oriX = { oriX.x / oriXlen, oriX.y / oriXlen, oriX.z / oriXlen };
// rotate by z
oriZ.x = pBuf->vehicle[i].oriY.x * cosf(wRot.z * cDelta) - pBuf->vehicle[i].oriY.y * sinf(wRot.z * cDelta);
oriZ.y = pBuf->vehicle[i].oriY.x * sinf(wRot.z * cDelta) + pBuf->vehicle[i].oriY.y * cosf(wRot.z * cDelta);
Expand All @@ -270,6 +271,7 @@ void SharedMemoryMapPlugin::UpdateTelemetry( const TelemInfoV2 &info ) {
oriX.y = oriY.y * cosf(wRot.x * cDelta) - oriY.z * sinf(wRot.x * cDelta);
oriX.z = oriY.y * sinf(wRot.x * cDelta) + oriY.z * cosf(wRot.x * cDelta);
oriXlen = sqrtf(oriX.x * oriX.x + oriX.y * oriX.y + oriX.z * oriX.z);
pBuf->vehicle[i].oriY = { oriX.x / oriXlen, oriX.y / oriXlen, oriX.z / oriXlen };
// rotate by z
oriZ.x = pBuf->vehicle[i].oriZ.x * cosf(wRot.z * cDelta) - pBuf->vehicle[i].oriZ.y * sinf(wRot.z * cDelta);
oriZ.y = pBuf->vehicle[i].oriZ.x * sinf(wRot.z * cDelta) + pBuf->vehicle[i].oriZ.y * cosf(wRot.z * cDelta);
Expand Down

0 comments on commit 878e038

Please sign in to comment.