| 259 | SetScale(scale); |
| 260 | |
| 261 | const float tChange = 0.5 * t0; |
| 262 | if (oldT < tChange && newT >= tChange) |
| 263 | { |
| 264 | int size = (Pars >> "CfgMimics" >> "States").GetEntryCount(); |
| 265 | int i = toIntFloor(size * GRandGen.RandomValue()); |
| 266 | GetHead()->SetMimic((Pars >> "CfgMimics" >> "States").GetEntry(i).GetName()); |
| 267 | } |
| 268 | |
| 269 | GetHead()->Simulate(*GetHeadType(), time - _lastSimulation, SimulateVisibleNear, false); |
| 270 | _lastSimulation = time; |
| 271 | } |
| 272 | |
| 273 | void CHead::SetFace(RString name) |
| 274 | { |
| 275 | const ParamEntry* cls = (Pars >> "CfgFaces").FindEntry(name); |
| 276 | if (!cls) |
| 277 | { |
| 278 | cls = (Pars >> "CfgFaces").FindEntry("Default"); |
| 279 | // WarningMessage("Unknown face: %s", (const char *)name); |
| 280 | if (!cls) |
| 281 | { |
| 282 | return; |
| 283 | } |
| 284 | } |
no test coverage detected