| 709 | } |
| 710 | |
| 711 | void Terrain::Serialize(SerializeStream& stream, const void* otherObj) |
| 712 | { |
| 713 | // Base |
| 714 | Actor::Serialize(stream, otherObj); |
| 715 | |
| 716 | SERIALIZE_GET_OTHER_OBJ(Terrain); |
| 717 | |
| 718 | SERIALIZE_MEMBER(LODBias, _lodBias); |
| 719 | SERIALIZE_MEMBER(ForcedLOD, _forcedLod); |
| 720 | SERIALIZE_MEMBER(LODDistribution, _lodDistribution); |
| 721 | SERIALIZE_MEMBER(ScaleInLightmap, _scaleInLightmap); |
| 722 | SERIALIZE_MEMBER(BoundsExtent, _boundsExtent); |
| 723 | SERIALIZE_MEMBER(CollisionLOD, _collisionLod); |
| 724 | SERIALIZE_MEMBER(PhysicalMaterials, _physicalMaterials); |
| 725 | SERIALIZE(Material); |
| 726 | SERIALIZE(DrawModes); |
| 727 | |
| 728 | SERIALIZE_MEMBER(LODCount, _lodCount); |
| 729 | SERIALIZE_MEMBER(ChunkSize, _chunkSize); |
| 730 | |
| 731 | if (_patches.HasItems()) |
| 732 | { |
| 733 | stream.JKEY("Patches"); |
| 734 | stream.StartArray(); |
| 735 | for (int32 patchIndex = 0; patchIndex < _patches.Count(); patchIndex++) |
| 736 | { |
| 737 | stream.StartObject(); |
| 738 | _patches[patchIndex]->Serialize(stream, other && other->_patches.Count() == _patches.Count() ? other->_patches[patchIndex] : nullptr); |
| 739 | stream.EndObject(); |
| 740 | } |
| 741 | stream.EndArray(); |
| 742 | } |
| 743 | } |
| 744 | |
| 745 | void Terrain::Deserialize(DeserializeStream& stream, ISerializeModifier* modifier) |
| 746 | { |