mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Merge branch 'AlKabir/animals-dont-drop-lootbags' into 'master'
Make different mobs drop different assets on death (not just lootbags) See merge request veloren/veloren!1462
This commit is contained in:
commit
8cab21d44c
BIN
assets/voxygen/voxel/object/meat_drop.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/object/meat_drop.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/object/steak.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/object/steak.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -68,6 +68,8 @@ make_case_elim!(
|
||||
FireworkYellow = 58,
|
||||
MultiArrow = 59,
|
||||
BoltNature = 60,
|
||||
MeatDrop = 61,
|
||||
Steak = 62,
|
||||
}
|
||||
);
|
||||
|
||||
@ -78,7 +80,7 @@ impl Body {
|
||||
}
|
||||
}
|
||||
|
||||
pub const ALL_OBJECTS: [Body; 61] = [
|
||||
pub const ALL_OBJECTS: [Body; 63] = [
|
||||
Body::Arrow,
|
||||
Body::Bomb,
|
||||
Body::Scarecrow,
|
||||
@ -140,6 +142,8 @@ pub const ALL_OBJECTS: [Body; 61] = [
|
||||
Body::FireworkYellow,
|
||||
Body::MultiArrow,
|
||||
Body::BoltNature,
|
||||
Body::MeatDrop,
|
||||
Body::Steak,
|
||||
];
|
||||
|
||||
impl From<Body> for super::Body {
|
||||
@ -210,6 +214,8 @@ impl Body {
|
||||
Body::FireworkYellow => "firework_yellow",
|
||||
Body::MultiArrow => "multi_arrow",
|
||||
Body::BoltNature => "bolt_nature",
|
||||
Body::MeatDrop => "meat_drop",
|
||||
Body::Steak => "steak",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -433,10 +433,13 @@ pub fn handle_destroy(server: &mut Server, entity: EcsEntity, cause: HealthSourc
|
||||
let pos = state.ecs().read_storage::<comp::Pos>().get(entity).cloned();
|
||||
if let Some(pos) = pos {
|
||||
let _ = state
|
||||
.create_object(
|
||||
comp::Pos(pos.0 + Vec3::unit_z() * 0.25),
|
||||
object::Body::Pouch,
|
||||
)
|
||||
.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,
|
||||
Some(common::comp::Body::BipedLarge(_))
|
||||
| Some(common::comp::Body::QuadrupedLow(_)) => object::Body::MeatDrop,
|
||||
_ => object::Body::Steak,
|
||||
})
|
||||
.with(item)
|
||||
.build();
|
||||
} else {
|
||||
|
@ -3649,6 +3649,8 @@ fn mesh_object(obj: &object::Body) -> BoneMeshes {
|
||||
Body::TrainingDummy => ("object.training_dummy", Vec3::new(-7.0, -5.0, 0.0)),
|
||||
Body::MultiArrow => ("weapon.projectile.multi-arrow", Vec3::new(-4.0, -9.5, -5.0)),
|
||||
Body::BoltNature => ("weapon.projectile.nature-bolt", Vec3::new(-6.0, -6.0, -6.0)),
|
||||
Body::MeatDrop => ("object.meat_drop", Vec3::new(-3.5, -8.0, 0.0)),
|
||||
Body::Steak => ("object.steak", Vec3::new(-3.5, -6.0, 0.0)),
|
||||
};
|
||||
load_mesh(name, offset)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user