From 7dfd9205e5b1ae43e08b5ce3d6752014f2242ef1 Mon Sep 17 00:00:00 2001 From: jake Date: Sat, 9 Nov 2019 15:14:05 -0800 Subject: [PATCH] can't derive Default anymore here --- src/character/character.rs | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/character/character.rs b/src/character/character.rs index 586d3be..ac79bbb 100644 --- a/src/character/character.rs +++ b/src/character/character.rs @@ -5,7 +5,7 @@ use psopacket::PSOPacketData; use crate::{PSOPacketData, PacketParseError}; //use crate::PSOPacketData; -#[derive(PSOPacketData, Default, Copy, Clone)] +#[derive(PSOPacketData, Copy, Clone)] #[repr(C)] pub struct Character { pub atp: u16, @@ -43,7 +43,7 @@ pub struct Character { pub prop_x: f32, pub prop_y: f32, pub name: [u16; 16], - //pub config: [u8; 0xE8], + pub config: [u8; 0xE8], pub techniques: [u8; 0x14], } @@ -151,7 +151,19 @@ impl SelectScreenCharacter { name: self.name, play_time: self.play_time, - ..Character::default() + _unknown1: 0, + _unknown2: [0; 2], + _unused: [0; 11], + atp: 0, + mst: 0, + evp: 0, + hp: 0, + dfp: 0, + ata: 0, + lck: 0, + config: [0; 0xE8], + meseta: 0, + techniques: [0; 0x14], } } }