void LogDeformPhysicalEntity( const char * from, IPhysicalEntity * pEnt, const Vec3& p, const Vec3& n, float energy ) { #if DEBUG_NET_BREAKAGE if (!pEnt) return; if (CNetworkCVars::Get().BreakageLog) { CryLog("[brk] DeformPhysicalEntity on %s @ (%.8f,%.8f,%.8f); n=(%.8f,%.8f,%.8f); energy=%.8f", from, p.x, p.y, p.z, n.x, n.y, n.z, energy); CryLog("[brk] selector is %s", CObjectSelector::GetDescription(pEnt).c_str()); switch (pEnt->GetiForeignData()) { case PHYS_FOREIGN_ID_STATIC: if (IRenderNode * pRN = (IRenderNode*)pEnt->GetForeignData(PHYS_FOREIGN_ID_STATIC)) { CryLog("[brk] name is %s", pRN->GetName()); CryLog("[brk] entity class name is %s", pRN->GetEntityClassName()); CryLog("[brk] debug string is %s", pRN->GetDebugString().c_str()); } break; case PHYS_FOREIGN_ID_ENTITY: if (IEntity * pEntity = (IEntity*)pEnt->GetForeignData(PHYS_FOREIGN_ID_ENTITY)) { CryLog("[brk] name is %s", pEntity->GetName()); Matrix34 m = pEntity->GetWorldTM(); CryLog("[brk] world tm:"); for (int i=0; i<3; i++) { Vec4 row = m.GetRow4(i); CryLog("[brk] %+12.8f %+12.8f %+12.8f %+12.8f", row[0], row[1], row[2], row[3]); } } break; } } #endif }