mirror of
https://github.com/Redot-Engine/redot-engine.git
synced 2025-12-06 07:17:42 -05:00
Merge commit godotengine/godot@71a9948157
This commit is contained in:
@@ -412,10 +412,10 @@ Vector<AudioFrame> AudioStreamPlayer3D::_update_panning() {
|
||||
|
||||
float dist = local_pos.length();
|
||||
|
||||
#ifndef PHYSICS_3D_DISABLED
|
||||
Vector3 area_sound_pos;
|
||||
Vector3 listener_area_pos;
|
||||
|
||||
#ifndef PHYSICS_3D_DISABLED
|
||||
Area3D *area = _get_overriding_area();
|
||||
if (area && area->is_using_reverb_bus() && area->get_reverb_uniformity() > 0) {
|
||||
area_sound_pos = space_state->get_closest_point_to_object_volume(area->get_rid(), listener_node->get_global_transform().origin);
|
||||
|
||||
@@ -50,7 +50,7 @@ void CPUParticles3D::set_emitting(bool p_emitting) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (p_emitting && !use_fixed_seed) {
|
||||
if (p_emitting && !use_fixed_seed && one_shot) {
|
||||
set_seed(Math::rand());
|
||||
}
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ AABB GPUParticles3D::get_aabb() const {
|
||||
|
||||
void GPUParticles3D::set_emitting(bool p_emitting) {
|
||||
// Do not return even if `p_emitting == emitting` because `emitting` is just an approximation.
|
||||
if (p_emitting && p_emitting != emitting && !use_fixed_seed) {
|
||||
if (p_emitting && p_emitting != emitting && !use_fixed_seed && one_shot) {
|
||||
set_seed(Math::rand());
|
||||
}
|
||||
if (p_emitting && one_shot) {
|
||||
@@ -246,7 +246,7 @@ void GPUParticles3D::set_trail_enabled(bool p_enabled) {
|
||||
}
|
||||
|
||||
void GPUParticles3D::set_trail_lifetime(double p_seconds) {
|
||||
ERR_FAIL_COND(p_seconds < 0.01);
|
||||
ERR_FAIL_COND(p_seconds < 0.01 - CMP_EPSILON);
|
||||
trail_lifetime = p_seconds;
|
||||
RS::get_singleton()->particles_set_trails(particles, trail_enabled, trail_lifetime);
|
||||
}
|
||||
|
||||
@@ -1030,6 +1030,7 @@ void Node3D::set_as_top_level(bool p_enabled) {
|
||||
}
|
||||
}
|
||||
data.top_level = p_enabled;
|
||||
reset_physics_interpolation();
|
||||
}
|
||||
|
||||
void Node3D::set_as_top_level_keep_local(bool p_enabled) {
|
||||
@@ -1039,6 +1040,7 @@ void Node3D::set_as_top_level_keep_local(bool p_enabled) {
|
||||
}
|
||||
data.top_level = p_enabled;
|
||||
_propagate_transform_changed(this);
|
||||
reset_physics_interpolation();
|
||||
}
|
||||
|
||||
bool Node3D::is_set_as_top_level() const {
|
||||
|
||||
Reference in New Issue
Block a user