Executes a per-character script command
| 1321 | |
| 1322 | //Executes a per-character script command |
| 1323 | bool CryCharInstance::ExecScriptCommand (int nCommand, void* pParams, void* pResult) |
| 1324 | { |
| 1325 | switch (nCommand) |
| 1326 | { |
| 1327 | case CASCMD_CLEAR_DECALS: |
| 1328 | m_pModelState->ClearDecals(); |
| 1329 | break; |
| 1330 | |
| 1331 | case CASCMD_DUMP_DECALS: |
| 1332 | g_GetLog()->Log("\001Instance 0x%p", this); |
| 1333 | m_pModelState->DumpDecals(); |
| 1334 | break; |
| 1335 | |
| 1336 | case CASCMD_DUMP_STATES: |
| 1337 | g_GetLog()->LogToFile("\001 Instance 0x%p, state 0x%p", this, m_pModelState); |
| 1338 | #if defined(LINUX) |
| 1339 | g_GetLog()->LogToFile("\001 %d binds, speed %f, matrix:{%f,%f,%f,%f}{%f,%f,%f,%f}{%f,%f,%f,%f}{%f,%f,%f,%f}", m_arrBinds.size(), m_fAnimSpeedScale, m_matTranRotMatrix.GetData()); |
| 1340 | #else |
| 1341 | g_GetLog()->LogToFile("\001 %d binds, speed %f, matrix:{%g,%g,%g,%g}{%g,%g,%g,%g}{%g,%g,%g,%g}{%g,%g,%g,%g}", m_arrBinds.size(), m_fAnimSpeedScale, m_matTranRotMatrix); |
| 1342 | #endif |
| 1343 | m_pModelState->DumpState(); |
| 1344 | break; |
| 1345 | |
| 1346 | case CASCMD_START_MANY_ANIMS: |
| 1347 | { |
| 1348 | const CASCmdStartMultiAnims& ma = *(CASCmdStartMultiAnims*)(pParams); |
| 1349 | for (int i = 0; i < ma.numAnims; ++i) |
| 1350 | { |
| 1351 | const CASCmdStartAnim& sa = ma.pAnims[i]; |
| 1352 | g_GetLog()->LogToConsole("\001Starting \"%s\" @ %d", sa.szAnimName, sa.nLayer); |
| 1353 | StartAnimation (sa.szAnimName, CryCharAnimationParams(ma.fBlendTime, ma.fBlendTime, sa.nLayer)); |
| 1354 | } |
| 1355 | } |
| 1356 | break; |
| 1357 | |
| 1358 | case CASCMD_DEBUG_DRAW: |
| 1359 | m_pModelState->debugDrawBones(); |
| 1360 | m_pModelState->debugDrawBoundingBox(NULL, 4); |
| 1361 | break; |
| 1362 | } |
| 1363 | return true; |
| 1364 | } |
| 1365 | |
| 1366 | // notifies the renderer that the character will soon be rendered |
| 1367 | void CryCharInstance::PreloadResources ( float fDistance, float fTime, int nFlags ) |
nothing calls this directly
no test coverage detected