mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Added proper training dummy model
This commit is contained in:
parent
c525358637
commit
954a4857c4
BIN
assets/voxygen/voxel/object/training_dummy.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/object/training_dummy.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -56,6 +56,7 @@ pub enum Body {
|
||||
ArrowSnake = 50,
|
||||
CampfireLit = 51,
|
||||
BoltFireBig = 52,
|
||||
TrainingDummy = 53,
|
||||
}
|
||||
|
||||
impl Body {
|
||||
@ -65,7 +66,7 @@ impl Body {
|
||||
}
|
||||
}
|
||||
|
||||
pub const ALL_OBJECTS: [Body; 53] = [
|
||||
pub const ALL_OBJECTS: [Body; 54] = [
|
||||
Body::Arrow,
|
||||
Body::Bomb,
|
||||
Body::Scarecrow,
|
||||
@ -119,6 +120,7 @@ pub const ALL_OBJECTS: [Body; 53] = [
|
||||
Body::BoltFire,
|
||||
Body::BoltFireBig,
|
||||
Body::ArrowSnake,
|
||||
Body::TrainingDummy,
|
||||
];
|
||||
|
||||
impl Body {
|
||||
@ -177,6 +179,7 @@ impl Body {
|
||||
Body::BoltFire => "bolt_fire",
|
||||
Body::BoltFireBig => "bolt_fire_big",
|
||||
Body::ArrowSnake => "arrow_snake",
|
||||
Body::TrainingDummy => "training_dummy",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -597,7 +597,7 @@ fn handle_spawn_training_dummy(
|
||||
10.0,
|
||||
);
|
||||
|
||||
let body = comp::Body::Object(comp::object::Body::Scarecrow);
|
||||
let body = comp::Body::Object(comp::object::Body::TrainingDummy);
|
||||
|
||||
let mut stats = comp::Stats::new("Training Dummy".to_string(), body);
|
||||
|
||||
|
@ -24,6 +24,10 @@ pub fn handle_damage(server: &Server, uid: Uid, change: HealthChange) {
|
||||
}
|
||||
}
|
||||
|
||||
/// Handle an entity dying. If it is a player, it will send a message to all
|
||||
/// other players. If the entity that killed it had stats, then give it exp for
|
||||
/// the kill. Experience given is equal to the level of the entity that was
|
||||
/// killed times 10.
|
||||
pub fn handle_destroy(server: &mut Server, entity: EcsEntity, cause: HealthSource) {
|
||||
let state = server.state_mut();
|
||||
|
||||
|
@ -3020,6 +3020,7 @@ pub fn mesh_object(
|
||||
Body::ArrowSnake => ("weapon.projectile.snake-arrow", Vec3::new(-1.5, -6.5, 0.0)),
|
||||
Body::BoltFire => ("weapon.projectile.fire-bolt-0", Vec3::new(-3.0, -5.5, -3.0)),
|
||||
Body::BoltFireBig => ("weapon.projectile.fire-bolt-1", Vec3::new(-6.0, -6.0, -6.0)),
|
||||
Body::TrainingDummy => ("object.training_dummy", Vec3::new(-7.0, -5.0, 0.0)),
|
||||
};
|
||||
load_mesh(name, offset, generate_mesh)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user