mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-20 04:09:16 +00:00
Cleanup: Don't pass a writable scratch buffer off to dozens of virtual
functions -- that's just silly!
This commit is contained in:
@ -594,42 +594,38 @@ bool plAvBrainSwim::IHandleControlMsg(plControlEventMsg* msg)
|
||||
}
|
||||
|
||||
|
||||
void plAvBrainSwim::DumpToDebugDisplay(int &x, int &y, int lineHeight, char *strBuf, plDebugText &debugTxt)
|
||||
void plAvBrainSwim::DumpToDebugDisplay(int &x, int &y, int lineHeight, plDebugText &debugTxt)
|
||||
{
|
||||
sprintf(strBuf, "Brain type: Swim");
|
||||
debugTxt.DrawString(x, y, strBuf, 0, 255, 255);
|
||||
debugTxt.DrawString(x, y, "Brain type: Swim", 0, 255, 255);
|
||||
y += lineHeight;
|
||||
|
||||
switch(fMode) {
|
||||
case kWading:
|
||||
sprintf(strBuf, "Mode: Wading");
|
||||
debugTxt.DrawString(x, y, "Mode: Wading");
|
||||
break;
|
||||
case kSwimming2D:
|
||||
sprintf(strBuf, "Mode: Swimming2D");
|
||||
debugTxt.DrawString(x, y, "Mode: Swimming2D");
|
||||
break;
|
||||
case kSwimming3D:
|
||||
sprintf(strBuf, "Mode: Swimming3D");
|
||||
debugTxt.DrawString(x, y, "Mode: Swimming3D");
|
||||
break;
|
||||
case kAbort:
|
||||
sprintf(strBuf, "Mode: Abort (you should never see this)");
|
||||
debugTxt.DrawString(x, y, "Mode: Abort (you should never see this)");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
debugTxt.DrawString(x, y, strBuf);
|
||||
y += lineHeight;
|
||||
|
||||
float buoy = fSwimStrategy ? fSwimStrategy->GetBuoyancy() : 0.0f;
|
||||
sprintf(strBuf, "Distance to surface: %f Buoyancy: %f", fSurfaceDistance, buoy);
|
||||
debugTxt.DrawString(x, y, strBuf);
|
||||
debugTxt.DrawString(x, y, plString::Format("Distance to surface: %f Buoyancy: %f", fSurfaceDistance, buoy));
|
||||
y += lineHeight;
|
||||
|
||||
hsVector3 linV = fAvMod->GetController()->GetAchievedLinearVelocity();
|
||||
sprintf(strBuf, "Linear Velocity: (%5.2f, %5.2f, %5.2f)", linV.fX, linV.fY, linV.fZ);
|
||||
debugTxt.DrawString(x, y, strBuf);
|
||||
debugTxt.DrawString(x, y, plString::Format("Linear Velocity: (%5.2f, %5.2f, %5.2f)", linV.fX, linV.fY, linV.fZ));
|
||||
y += lineHeight;
|
||||
|
||||
int i;
|
||||
for (i = 0; i < fBehaviors.GetCount(); i++)
|
||||
fBehaviors[i]->DumpDebug(x, y, lineHeight, strBuf, debugTxt);
|
||||
fBehaviors[i]->DumpDebug(x, y, lineHeight, debugTxt);
|
||||
}
|
||||
|
Reference in New Issue
Block a user