mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Added particles dedicated for shockwave.
This commit is contained in:
parent
3e4615daea
commit
0c48efd445
@ -47,6 +47,7 @@ const int FIREWORK_YELLOW = 8;
|
||||
const int LEAF = 9;
|
||||
const int FIREFLY = 10;
|
||||
const int BEE = 11;
|
||||
const int GROUND_SHOCKWAVE = 12;
|
||||
|
||||
// meters per second squared (acceleration)
|
||||
const float earth_gravity = 9.807;
|
||||
@ -240,6 +241,16 @@ void main() {
|
||||
vec4(vec3(1, 0.7, 0), 1),
|
||||
spin_in_axis(vec3(rand6, rand7, rand8), rand9 * 3 + lifetime * 5)
|
||||
);
|
||||
} else if (inst_mode == GROUND_SHOCKWAVE) {
|
||||
attr = Attr(
|
||||
linear_motion(
|
||||
vec3(rand0 * 0.25, rand1 * 0.25, 0.0),
|
||||
vec3(rand2 * 0.1, rand3 * 0.1, 0.0)
|
||||
),
|
||||
3.0 + 5.0 * rand5,
|
||||
vec4(vec3(0.42, 0.32, 0.1), 1),
|
||||
spin_in_axis(vec3(rand6, rand7, rand8), rand9 * 3 + lifetime * 5)
|
||||
);
|
||||
} else {
|
||||
attr = Attr(
|
||||
linear_motion(
|
||||
|
@ -105,6 +105,7 @@ pub enum ParticleMode {
|
||||
Leaf = 9,
|
||||
Firefly = 10,
|
||||
Bee = 11,
|
||||
GroundShockwave = 12,
|
||||
}
|
||||
|
||||
impl ParticleMode {
|
||||
|
@ -446,7 +446,7 @@ impl ParticleMgr {
|
||||
self.particles.push(Particle::new(
|
||||
Duration::from_millis(250),
|
||||
time,
|
||||
ParticleMode::CampfireFire, // TODO: TerrainShockwave
|
||||
ParticleMode::GroundShockwave,
|
||||
pos.0
|
||||
+ Vec3::new(
|
||||
p * ((theta - (shockwave.properties.angle.to_radians() / 2.0))
|
||||
|
Loading…
Reference in New Issue
Block a user