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

Method Load

engine/Poseidon/AI/AIUnit.cpp:455–471  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

453}
454
455void AIUnit::Load(const ParamEntry& cls)
456{
457 Person* soldier = GetPerson();
458 if (soldier)
459 {
460 AIUnitInfo& info = soldier->GetInfo();
461 info._identityContext = cls.GetContext();
462 info._name = DecodeLegacyTextToRString(cls >> "name", GLanguage);
463 info._face = cls >> "face";
464 info._glasses = cls >> "glasses";
465 soldier->SetFace(info._face);
466 soldier->SetGlasses(info._glasses);
467 info._speaker = cls >> "speaker";
468 info._pitch = cls >> "pitch";
469 SetSpeaker(info._speaker, info._pitch);
470 }
471}
472
473template <>
474const EnumName* Foundation::GetEnumNames(AIUnit::ResourceState dummy)

Callers 5

pf_vfs_mountFunction · 0.45
CreateSoldierMethod · 0.45
CreateUnitMethod · 0.45
PreviewTerrainFunction · 0.45
InspectTerrainFunction · 0.45

Calls 4

GetContextMethod · 0.45
SetFaceMethod · 0.45
SetGlassesMethod · 0.45

Tested by

no test coverage detected