/////////////////////////////////////////////////////////////////////
| 1195 | |
| 1196 | ////////////////////////////////////////////////////////////////////////// |
| 1197 | void CEntity::UpdateCharacters( SEntityUpdateContext &ctx ) |
| 1198 | { |
| 1199 | if(!m_pEntitySystem->m_pUpdateBonePositions->GetIVal()) |
| 1200 | return; |
| 1201 | |
| 1202 | bool bProcess=m_bVisible; |
| 1203 | |
| 1204 | IGame *pGame = GetISystem()->GetIGame(); |
| 1205 | |
| 1206 | // ensure update to collision detection in multiplayer |
| 1207 | // (only done on the server so the client decal might be produced |
| 1208 | // wrong if you don't look at the target but this way we can save computation time) |
| 1209 | if(pGame && pGame->GetModuleState(EGameMultiplayer) && pGame->GetModuleState(EGameServer)) |
| 1210 | bProcess = true; |
| 1211 | |
| 1212 | if(m_eUpdateVisLevel == eUT_Physics) |
| 1213 | bProcess = true; |
| 1214 | |
| 1215 | if(bProcess) |
| 1216 | { |
| 1217 | ENTITY_PROFILER |
| 1218 | |
| 1219 | for(int k = 0; k < m_nMaxCharNum; k++) |
| 1220 | { |
| 1221 | if(m_pCryCharInstance[k] && (m_pCryCharInstance[k]->GetFlags() & CS_FLAG_UPDATE)) |
| 1222 | { |
| 1223 | m_pCryCharInstance[k]->Update(m_center,m_fRadius); |
| 1224 | |
| 1225 | // recalc bbox if animated |
| 1226 | if(m_pCryCharInstance[k]->IsCharacterActive()) |
| 1227 | //CalcWholeBBox(); look further down for actual call |
| 1228 | m_bRecalcBBox = true; |
| 1229 | } |
| 1230 | } |
| 1231 | } |
| 1232 | else |
| 1233 | { |
| 1234 | for(int k = 0; k < m_nMaxCharNum; k++) |
| 1235 | { |
| 1236 | if(m_pCryCharInstance[k] && (m_pCryCharInstance[k]->GetFlags() & CS_FLAG_UPDATE)) |
| 1237 | m_pCryCharInstance[k]->Update( m_center,m_fRadius, ICryCharInstance::flagDontUpdateBones); |
| 1238 | } |
| 1239 | } |
| 1240 | |
| 1241 | if(bProcess) |
| 1242 | { |
| 1243 | UpdateCharacterPhysicsAndIK( ctx ); |
| 1244 | } |
| 1245 | else if(m_physic) |
| 1246 | { |
| 1247 | pe_params_sensors ps; |
| 1248 | ps.nSensors = 0; |
| 1249 | m_physic->SetParams(&ps); |
| 1250 | } |
| 1251 | } |
| 1252 | |
| 1253 | ////////////////////////////////////////////////////////////////////////// |
| 1254 | void CEntity::UpdateLipSync( SEntityUpdateContext &ctx ) |
nothing calls this directly
no test coverage detected