new model for portal & use cultist particles

This commit is contained in:
Maxicarlos08 2023-08-24 16:32:10 +02:00
parent 0f13b407a2
commit f2958954b9
No known key found for this signature in database
6 changed files with 12 additions and 19 deletions

View File

@ -83,7 +83,6 @@ const int GIGA_SNOW = 42;
const int CYCLOPS_CHARGE = 43;
const int PORTAL_FIZZ = 45;
const int INK = 46;
const int UPWARD_PORTAL_FIZZ = 47;
// meters per second squared (acceleration)
const float earth_gravity = 9.807;
@ -704,15 +703,6 @@ void main() {
spin_in_axis(vec3(rand6, rand7, rand8), percent() * 10 + 3 * rand9)
);
break;
case UPWARD_PORTAL_FIZZ:
f_reflect = 0.0;
attr = Attr(
inst_dir * percent(),
vec3(max(1.0, 0.05 * length(start_pos + inst_dir * percent()))),
vec4(vec3(1.23, 1.41, 1.44), 1.0),// * (1.0 - length(inst_dir) * 0.1),
identity()//spin_in_axis(perp_axis, asin(inst_dir.z / length(inst_dir)) + PI / 2.0)
);
break;
default:
attr = Attr(
linear_motion(

BIN
assets/voxygen/voxel/object/portal.vox (Stored with Git LFS)

Binary file not shown.

Binary file not shown.

View File

@ -95,7 +95,10 @@ impl<'a> System<'a> for Sys {
}) || (*requires_no_aggro && check_aggro(entity, position.0))
|| !matches!(
character_state,
CharacterState::Idle(_) | CharacterState::Wielding(_)
CharacterState::Idle(_)
| CharacterState::Wielding(_)
| CharacterState::Sit
| CharacterState::Dance
)
{
cancel_teleporting.push(entity);
@ -113,6 +116,7 @@ impl<'a> System<'a> for Sys {
(matches!(alignment, Alignment::Owned(entity_uid) if entity_uid == uid)
&& entity_position.0.distance_squared(position.0)
<= PET_TELEPORT_RADIUS.powi(2)
// Allow for non-players to teleport too
|| entity == nearby_entity)
.then_some(nearby_entity)
});

View File

@ -98,7 +98,6 @@ pub enum ParticleMode {
SnowStorm = 44,
PortalFizz = 45,
Ink = 46,
UpwardPortalFizz = 47,
}
impl ParticleMode {

View File

@ -760,9 +760,9 @@ impl ParticleMgr {
pos + (Vec2::unit_x().rotated_z(rng.gen_range((0.)..PI * 2.)) * 2.7).with_z(0.);
self.particles.push(Particle::new_directed(
Duration::from_secs_f32(rng.gen_range(0.2..0.5)),
Duration::from_secs_f32(rng.gen_range(0.4..0.8)),
time,
ParticleMode::UpwardPortalFizz,
ParticleMode::CultistFlame,
outer_pos,
outer_pos + Vec3::unit_z() * rng.gen_range(5.0..7.0),
));
@ -788,7 +788,7 @@ impl ParticleMgr {
self.particles.push(Particle::new_directed(
Duration::from_secs_f32(rng.gen_range(0.5..3.0)),
time,
ParticleMode::UpwardPortalFizz,
ParticleMode::CultistFlame,
outer_pos,
outer_pos + Vec3::unit_z() * rng.gen_range(3.0..4.0),
));