mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Merge branch 'maxicarlos08/teleporter-fix' into 'master'
Portal tweaks See merge request veloren/veloren!4091
This commit is contained in:
commit
a386c68df5
@ -49,6 +49,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
- Changed iron ore to iron ingots in the instruments' recipes
|
- Changed iron ore to iron ingots in the instruments' recipes
|
||||||
- Changed gold ore to gold ingots in the Brinstone armor set recipes
|
- Changed gold ore to gold ingots in the Brinstone armor set recipes
|
||||||
- Updated windowing library, wayland may work better.
|
- Updated windowing library, wayland may work better.
|
||||||
|
- Portal model has been updated by @Nectical
|
||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
- Medium and large potions from all loot tables
|
- Medium and large potions from all loot tables
|
||||||
|
@ -83,7 +83,6 @@ const int GIGA_SNOW = 42;
|
|||||||
const int CYCLOPS_CHARGE = 43;
|
const int CYCLOPS_CHARGE = 43;
|
||||||
const int PORTAL_FIZZ = 45;
|
const int PORTAL_FIZZ = 45;
|
||||||
const int INK = 46;
|
const int INK = 46;
|
||||||
const int UPWARD_PORTAL_FIZZ = 47;
|
|
||||||
|
|
||||||
// meters per second squared (acceleration)
|
// meters per second squared (acceleration)
|
||||||
const float earth_gravity = 9.807;
|
const float earth_gravity = 9.807;
|
||||||
@ -704,15 +703,6 @@ void main() {
|
|||||||
spin_in_axis(vec3(rand6, rand7, rand8), percent() * 10 + 3 * rand9)
|
spin_in_axis(vec3(rand6, rand7, rand8), percent() * 10 + 3 * rand9)
|
||||||
);
|
);
|
||||||
break;
|
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:
|
default:
|
||||||
attr = Attr(
|
attr = Attr(
|
||||||
linear_motion(
|
linear_motion(
|
||||||
|
BIN
assets/voxygen/voxel/object/portal.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/object/portal.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/object/portal_active.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/object/portal_active.vox
(Stored with Git LFS)
Binary file not shown.
@ -95,7 +95,10 @@ impl<'a> System<'a> for Sys {
|
|||||||
}) || (*requires_no_aggro && check_aggro(entity, position.0))
|
}) || (*requires_no_aggro && check_aggro(entity, position.0))
|
||||||
|| !matches!(
|
|| !matches!(
|
||||||
character_state,
|
character_state,
|
||||||
CharacterState::Idle(_) | CharacterState::Wielding(_)
|
CharacterState::Idle(_)
|
||||||
|
| CharacterState::Wielding(_)
|
||||||
|
| CharacterState::Sit
|
||||||
|
| CharacterState::Dance
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
cancel_teleporting.push(entity);
|
cancel_teleporting.push(entity);
|
||||||
@ -109,11 +112,13 @@ impl<'a> System<'a> for Sys {
|
|||||||
.join()
|
.join()
|
||||||
.get(entity, &entities)
|
.get(entity, &entities)
|
||||||
})
|
})
|
||||||
.filter_map(|(entity, entity_position, alignment)| {
|
.filter_map(|(nearby_entity, entity_position, alignment)| {
|
||||||
(matches!(alignment, Alignment::Owned(entity_uid) if entity_uid == uid)
|
(matches!(alignment, Alignment::Owned(entity_uid) if entity_uid == uid)
|
||||||
&& entity_position.0.distance_squared(position.0)
|
&& entity_position.0.distance_squared(position.0)
|
||||||
<= PET_TELEPORT_RADIUS.powi(2))
|
<= PET_TELEPORT_RADIUS.powi(2)
|
||||||
.then_some(entity)
|
// Allow for non-players to teleport too
|
||||||
|
|| entity == nearby_entity)
|
||||||
|
.then_some(nearby_entity)
|
||||||
});
|
});
|
||||||
|
|
||||||
for entity in nearby {
|
for entity in nearby {
|
||||||
|
@ -98,7 +98,6 @@ pub enum ParticleMode {
|
|||||||
SnowStorm = 44,
|
SnowStorm = 44,
|
||||||
PortalFizz = 45,
|
PortalFizz = 45,
|
||||||
Ink = 46,
|
Ink = 46,
|
||||||
UpwardPortalFizz = 47,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ParticleMode {
|
impl ParticleMode {
|
||||||
|
@ -760,9 +760,9 @@ impl ParticleMgr {
|
|||||||
pos + (Vec2::unit_x().rotated_z(rng.gen_range((0.)..PI * 2.)) * 2.7).with_z(0.);
|
pos + (Vec2::unit_x().rotated_z(rng.gen_range((0.)..PI * 2.)) * 2.7).with_z(0.);
|
||||||
|
|
||||||
self.particles.push(Particle::new_directed(
|
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,
|
time,
|
||||||
ParticleMode::UpwardPortalFizz,
|
ParticleMode::CultistFlame,
|
||||||
outer_pos,
|
outer_pos,
|
||||||
outer_pos + Vec3::unit_z() * rng.gen_range(5.0..7.0),
|
outer_pos + Vec3::unit_z() * rng.gen_range(5.0..7.0),
|
||||||
));
|
));
|
||||||
@ -788,7 +788,7 @@ impl ParticleMgr {
|
|||||||
self.particles.push(Particle::new_directed(
|
self.particles.push(Particle::new_directed(
|
||||||
Duration::from_secs_f32(rng.gen_range(0.5..3.0)),
|
Duration::from_secs_f32(rng.gen_range(0.5..3.0)),
|
||||||
time,
|
time,
|
||||||
ParticleMode::UpwardPortalFizz,
|
ParticleMode::CultistFlame,
|
||||||
outer_pos,
|
outer_pos,
|
||||||
outer_pos + Vec3::unit_z() * rng.gen_range(3.0..4.0),
|
outer_pos + Vec3::unit_z() * rng.gen_range(3.0..4.0),
|
||||||
));
|
));
|
||||||
|
Loading…
Reference in New Issue
Block a user