MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / SetFace

Method SetFace

engine/Poseidon/UI/DisplayUIMenus.cpp:261–281  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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
273void 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 }

Callers 11

LoadMethod · 0.45
SerializeMethod · 0.45
TMCHECKFunction · 0.45
TransferMsgMethod · 0.45
BeginArcadeMethod · 0.45
OnMessageMethod · 0.45
DoRespawnMethod · 0.45
DisplayNewUserMethod · 0.45
OnLBSelChangedMethod · 0.45
ObjSetIdentityFunction · 0.45
ObjSetFaceFunction · 0.45

Calls 1

FindEntryMethod · 0.45

Tested by

no test coverage detected