diff --git a/server/src/events/entity_manipulation.rs b/server/src/events/entity_manipulation.rs index 9c5d467569..0b1b0b30da 100644 --- a/server/src/events/entity_manipulation.rs +++ b/server/src/events/entity_manipulation.rs @@ -433,14 +433,11 @@ pub fn handle_destroy(server: &mut Server, entity: EcsEntity, cause: HealthSourc let pos = state.ecs().read_storage::().get(entity).cloned(); if let Some(pos) = pos { let _ = state - .create_object( - comp::Pos(pos.0 + Vec3::unit_z() * 0.25), - match old_body{ - Some(common::comp::Body::Humanoid(_)) => object::Body::Pouch, - Some(common::comp::Body::Golem(_)) => object::Body::Chest, - _ => object::Body::Pumpkin, - }, - ) + .create_object(comp::Pos(pos.0 + Vec3::unit_z() * 0.25), match old_body { + Some(common::comp::Body::Humanoid(_)) => object::Body::Pouch, + Some(common::comp::Body::Golem(_)) => object::Body::Chest, + _ => object::Body::Pumpkin, + }) .with(item) .build(); } else {