Eradicated clones

This commit is contained in:
Sam
2021-02-07 11:57:41 -05:00
parent 9f2255a5de
commit 6a1e583d45
15 changed files with 64 additions and 38 deletions

View File

@ -268,9 +268,9 @@ impl<'a> System<'a> for Sys {
};
local_emitter.append(&mut state_update.local_events);
server_emitter.append(&mut state_update.server_events);
if let Some(ref inv_manip) = state_update.modify_loadout {
// TODO: Delete this clone, somehow...
server_emitter.emit(ServerEvent::InventoryManip(j.entity, inv_manip.clone()));
if let Some(loadout_manip) = state_update.modify_loadout {
server_emitter
.emit(ServerEvent::InventoryManip(j.entity, loadout_manip.into()));
}
incorporate_update(&mut tuple, state_update);
}