MCPcopy Create free account
hub / github.com/StrongPC123/Far-Cry-1-Source-Full / DumpState

Method DumpState

CryAnimation/CryModelState.cpp:1727–1812  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1725}
1726
1727void CryModelState::DumpState()
1728{
1729 string strLayers;
1730 size_t i;
1731 for (i = 0; i < m_arrAnimationLayers.size(); ++i)
1732 {
1733 AnimationLayer& rLayer = m_arrAnimationLayers[i];
1734 if (rLayer.pEffector)
1735 {
1736 strLayers += " " + rLayer.pEffector->dump();
1737
1738 if (rLayer.bEnableDefaultIdleAnimRestart)
1739 {
1740 strLayers += ":";
1741 if (rLayer.bKeepLayer0Phase)
1742 strLayers += " KeepLayer0Phase";
1743
1744 char szBuf[32];
1745 sprintf (szBuf, "%g", rLayer.fDefaultAnimBlendTime );
1746
1747 strLayers += " Idle blend: ";
1748 strLayers += szBuf;
1749
1750 if (rLayer.nDefaultIdleAnimID >= 0)
1751 {
1752 const AnimData* pAnim = m_pMesh->getAnimationInfo(rLayer.nDefaultIdleAnimID);
1753 strLayers += " Idle:" + pAnim->strName;
1754
1755 if (pAnim->bLoop)
1756 strLayers += " (looped)";
1757 }
1758
1759 strLayers += "; ";
1760 }
1761 else
1762 strLayers += "(no def idle)";
1763
1764 if (i < m_arrLayerSpeedScale.size())
1765 {
1766 float fSpeed = m_arrLayerSpeedScale[i];
1767 if (fSpeed != 1)
1768 {
1769 char szBuf[32];
1770 sprintf (szBuf, "*(%g)", fSpeed);
1771 strLayers += szBuf;
1772 }
1773 }
1774 }
1775 else
1776 strLayers += " <Idle>";
1777 }
1778 g_GetLog()->LogToFile("\001--ModelState %p-----------------------", this);
1779 g_GetLog()->LogToFile("\001%u layers: %s", m_arrAnimationLayers.size(), strLayers.c_str());
1780
1781 /*string strMorphs;
1782 for (i = 0; i < m_arrMorphEffectors.size(); ++i)
1783 {
1784 if (i)

Callers 1

ExecScriptCommandMethod · 0.80

Calls 10

g_GetLogFunction · 0.85
toStringFunction · 0.85
getAnimationInfoMethod · 0.80
getBoneInfoMethod · 0.80
sizeMethod · 0.45
dumpMethod · 0.45
LogToFileMethod · 0.45
c_strMethod · 0.45
getNameCStrMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected