| 41 | } |
| 42 | |
| 43 | bool Prefab::SetFromDesc(const EntityDescription& desc) { |
| 44 | bool ret = Group::SetFromDesc(desc); |
| 45 | if (ret) { |
| 46 | const EntityDescriptionField* l_prefab_locked = desc.GetField(EDF_PREFAB_LOCKED); |
| 47 | if (l_prefab_locked) { |
| 48 | l_prefab_locked->ReadBool(&prefab_locked); |
| 49 | } |
| 50 | |
| 51 | const EntityDescriptionField* l_prefab_path = desc.GetField(EDF_PREFAB_PATH); |
| 52 | if (l_prefab_path) { |
| 53 | l_prefab_path->ReadPath(&prefab_path); |
| 54 | } |
| 55 | |
| 56 | const EntityDescriptionField* l_original_scale = desc.GetField(EDF_ORIGINAL_SCALE); |
| 57 | if (l_original_scale) { |
| 58 | memread(original_scale_.entries, sizeof(float), 3, l_original_scale->data); |
| 59 | } |
| 60 | |
| 61 | InitRelMats(); |
| 62 | } |
| 63 | return ret; |
| 64 | } |
| 65 | |
| 66 | void Prefab::GetDesc(EntityDescription& desc) const { |
| 67 | Group::GetDesc(desc); |