Make different mobs drop different assetts on death (not just lootbags)

This commit is contained in:
AlKabir 2020-10-29 15:25:19 -05:00
parent 6566802b7f
commit 4053ef2e69

View File

@ -421,7 +421,11 @@ pub fn handle_destroy(server: &mut Server, entity: EcsEntity, cause: HealthSourc
let _ = state
.create_object(
comp::Pos(pos.0 + Vec3::unit_z() * 0.25),
object::Body::Pouch,
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();