Fix formatting and minor restructuring
Fixed formatting using cargo fmt. Change some parser structure to reduce code deduplication
This commit is contained in:
@@ -83,9 +83,7 @@ impl EntityContext {
|
||||
let result = decoder.decode(bitreader, qf_mapper)?;
|
||||
|
||||
if let Some(fi) = field_info {
|
||||
if let Some(prop_info) = prop_controller
|
||||
.prop_infos.get(&fi.prop_id)
|
||||
{
|
||||
if let Some(prop_info) = prop_controller.prop_infos.get(&fi.prop_id) {
|
||||
fields.push(EntityProp {
|
||||
field_info: fi,
|
||||
prop_info: prop_info.clone(),
|
||||
|
||||
@@ -271,10 +271,13 @@ impl PropController {
|
||||
}
|
||||
|
||||
fn insert_propinfo(&mut self, prop_name: &str, f: &mut ValueField) {
|
||||
self.prop_infos.insert(f.prop_id, PropInfo {
|
||||
id: f.prop_id as u32,
|
||||
prop_name: prop_name.into(),
|
||||
});
|
||||
self.prop_infos.insert(
|
||||
f.prop_id,
|
||||
PropInfo {
|
||||
id: f.prop_id as u32,
|
||||
prop_name: prop_name.into(),
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
pub fn set_special_ids(&mut self, weap_prop: &str, is_grenade_or_weapon: bool, id: u32) {
|
||||
|
||||
Reference in New Issue
Block a user