mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Glowing fireballs, no gravity
This commit is contained in:
parent
5194cef03a
commit
0eebf945fe
@ -123,15 +123,15 @@ impl ToolData {
|
||||
CastFireball {
|
||||
projectile: Projectile {
|
||||
hit_ground: vec![
|
||||
projectile::Effect::Explode { power: 5.0 },
|
||||
projectile::Effect::Explode { power: 1.5 },
|
||||
projectile::Effect::Vanish,
|
||||
],
|
||||
hit_wall: vec![
|
||||
projectile::Effect::Explode { power: 5.0 },
|
||||
projectile::Effect::Explode { power: 1.5 },
|
||||
projectile::Effect::Vanish,
|
||||
],
|
||||
hit_entity: vec![
|
||||
projectile::Effect::Explode { power: 5.0 },
|
||||
projectile::Effect::Explode { power: 1.5 },
|
||||
projectile::Effect::Vanish,
|
||||
],
|
||||
time_left: Duration::from_secs(20),
|
||||
|
@ -1,5 +1,5 @@
|
||||
use crate::{
|
||||
comp::{Body, CharacterState, Gravity, Projectile, StateUpdate},
|
||||
comp::{Body, CharacterState, LightEmitter, Projectile, StateUpdate},
|
||||
event::ServerEvent,
|
||||
states::utils::*,
|
||||
sys::character_behavior::*,
|
||||
@ -46,9 +46,12 @@ impl CharacterBehavior for Data {
|
||||
entity: data.entity,
|
||||
dir: data.inputs.look_dir,
|
||||
body: self.projectile_body,
|
||||
light: None,
|
||||
light: Some(LightEmitter {
|
||||
col: (0.0, 1.0, 0.3).into(),
|
||||
..Default::default()
|
||||
}),
|
||||
projectile,
|
||||
gravity: Some(Gravity(0.1)),
|
||||
gravity: None,
|
||||
});
|
||||
|
||||
update.character = CharacterState::CastFireball(Data {
|
||||
|
@ -5,7 +5,6 @@ use crate::{
|
||||
sys::{character_behavior::JoinData, phys::GRAVITY},
|
||||
util::safe_slerp,
|
||||
};
|
||||
use std::time::Duration;
|
||||
use vek::vec::Vec2;
|
||||
|
||||
pub const MOVEMENT_THRESHOLD_VEL: f32 = 3.0;
|
||||
|
@ -10,8 +10,6 @@ use specs::{Entities, Join, Read, ReadStorage, System, WriteStorage};
|
||||
use vek::*;
|
||||
|
||||
const BLOCK_EFFICIENCY: f32 = 0.9;
|
||||
|
||||
const ATTACK_RANGE: f32 = 3.5;
|
||||
const BLOCK_ANGLE: f32 = 180.0;
|
||||
|
||||
/// This system is responsible for handling accepted inputs like moving or
|
||||
|
Loading…
Reference in New Issue
Block a user