Browse Source

Fix crash when enabling Controller Debug display.

Joseph Davies 12 years ago
parent
commit
343610fb5a
  1. 2
      Sources/Plasma/PubUtilLib/plPhysX/plPXPhysicalControllerCore.cpp

2
Sources/Plasma/PubUtilLib/plPhysX/plPXPhysicalControllerCore.cpp

@ -872,7 +872,7 @@ void plPXPhysicalControllerCore::IDrawDebugDisplay()
char *overlapStr = fDbgCollisionInfo[i].fOverlap ? "yes" : "no"; char *overlapStr = fDbgCollisionInfo[i].fOverlap ? "yes" : "no";
float angle = hsRadiansToDegrees(acos(normal * hsVector3(0, 0, 1))); float angle = hsRadiansToDegrees(acos(normal * hsVector3(0, 0, 1)));
sprintf(strBuf, " Obj: %s, Normal: (%.2f, %.2f, %.2f), Angle(%.1f), Overlap(%3s)", sprintf(strBuf, " Obj: %s, Normal: (%.2f, %.2f, %.2f), Angle(%.1f), Overlap(%3s)",
fDbgCollisionInfo[i].fSO->GetKeyName(), fDbgCollisionInfo[i].fSO->GetKeyName().c_str(),
normal.fX, normal.fY, normal.fZ, angle, overlapStr); normal.fX, normal.fY, normal.fZ, angle, overlapStr);
debugTxt.DrawString(x, y, strBuf); debugTxt.DrawString(x, y, strBuf);
y += lineHeight; y += lineHeight;

Loading…
Cancel
Save