public static Mind Read(EndianBinaryReader reader, Pointer offset) { Mind m = new Mind(offset); m.off_AI_model = Pointer.Read(reader); m.off_intelligence_normal = Pointer.Read(reader); m.off_intelligence_reflex = Pointer.Read(reader); m.off_dsgMem = Pointer.Read(reader); m.off_name = Pointer.Read(reader); if (m.off_AI_model != null) { m.AI_model = AIModel.FromOffset(m.offset); if (m.AI_model == null) { Pointer.Goto(ref reader, m.off_AI_model); m.AI_model = AIModel.Read(reader, m.off_AI_model); } } if (MapLoader.Loader.mode == MapLoader.Mode.Rayman2PC && m.off_dsgMem != null) { Pointer.Goto(ref reader, m.off_dsgMem); m.dsgMem = DsgMem.Read(reader, m.off_dsgMem); } return(m); }
public void UpdateCurrentBehaviors(Reader reader) { off_AI_model = Pointer.Read(reader); off_intelligence_normal = Pointer.Read(reader); off_intelligence_reflex = Pointer.Read(reader); off_dsgMem = Pointer.Read(reader); if (off_dsgMem != null) { Pointer.Goto(ref reader, off_dsgMem); dsgMem = DsgMem.Read(reader, off_dsgMem); } if (off_intelligence_normal != null) { Pointer.Goto(ref reader, off_intelligence_normal); intelligenceNormal = Intelligence.Read(reader, off_intelligence_normal); } if (off_intelligence_reflex != null) { Pointer.Goto(ref reader, off_intelligence_reflex); intelligenceReflex = Intelligence.Read(reader, off_intelligence_reflex); } }
public void UpdateCurrentBehaviors(Reader reader) { off_AI_model = Pointer.Read(reader); off_intelligence_normal = Pointer.Read(reader); off_intelligence_reflex = Pointer.Read(reader); off_dsgMem = Pointer.Read(reader); MapLoader l = MapLoader.Loader; if (dsgMem == null) { dsgMem = l.FromOffsetOrRead <DsgMem>(reader, off_dsgMem); } dsgMem?.Read(reader); if (intelligenceNormal == null) { intelligenceNormal = l.FromOffsetOrRead <Intelligence>(reader, off_intelligence_normal); } intelligenceNormal?.Read(reader); if (intelligenceReflex == null) { intelligenceReflex = l.FromOffsetOrRead <Intelligence>(reader, off_intelligence_reflex); } intelligenceReflex?.Read(reader); }
public static Mind Read(Reader reader, Pointer offset) { Mind m = new Mind(offset); m.off_AI_model = Pointer.Read(reader); m.off_intelligence_normal = Pointer.Read(reader); //if (m.off_intelligence_normal != null) MapLoader.Loader.print(m.off_intelligence_normal); m.off_intelligence_reflex = Pointer.Read(reader); m.off_dsgMem = Pointer.Read(reader); if (Settings.s.hasNames) { m.off_name = Pointer.Read(reader); } m.byte0 = reader.ReadByte(); m.byte1 = reader.ReadByte(); m.byte2 = reader.ReadByte(); m.byte3 = reader.ReadByte(); m.AI_model = AIModel.FromOffsetOrRead(m.off_AI_model, reader); if (m.off_dsgMem != null) { Pointer.Goto(ref reader, m.off_dsgMem); m.dsgMem = DsgMem.Read(reader, m.off_dsgMem); } if (m.off_intelligence_normal != null) { Pointer.Goto(ref reader, m.off_intelligence_normal); m.intelligenceNormal = Intelligence.Read(reader, m.off_intelligence_normal); } if (m.off_intelligence_reflex != null) { Pointer.Goto(ref reader, m.off_intelligence_reflex); m.intelligenceReflex = Intelligence.Read(reader, m.off_intelligence_reflex); } return(m); }