You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-15 13:51:40 +00:00
Style: clang-format: Disable AllowShortIfStatementsOnASingleLine
Part of #33027, also discussed in #29848. Enforcing the use of brackets even on single line statements would be preferred, but `clang-format` doesn't have this functionality yet.
This commit is contained in:
@@ -961,7 +961,8 @@ void CPUParticles2D::_particles_process(float p_delta) {
|
||||
|
||||
//scale by scale
|
||||
float base_scale = tex_scale * Math::lerp(parameters[PARAM_SCALE], 1.0f, p.scale_rand * randomness[PARAM_SCALE]);
|
||||
if (base_scale < 0.000001) base_scale = 0.000001;
|
||||
if (base_scale < 0.000001)
|
||||
base_scale = 0.000001;
|
||||
|
||||
p.transform.elements[0] *= base_scale;
|
||||
p.transform.elements[1] *= base_scale;
|
||||
@@ -1196,7 +1197,8 @@ void CPUParticles2D::convert_from_particles(Node *p_particles) {
|
||||
set_param(m_param, material->get_param(ParticlesMaterial::m_param)); \
|
||||
{ \
|
||||
Ref<CurveTexture> ctex = material->get_param_texture(ParticlesMaterial::m_param); \
|
||||
if (ctex.is_valid()) set_param_curve(m_param, ctex->get_curve()); \
|
||||
if (ctex.is_valid()) \
|
||||
set_param_curve(m_param, ctex->get_curve()); \
|
||||
} \
|
||||
set_param_randomness(m_param, material->get_param_randomness(ParticlesMaterial::m_param));
|
||||
|
||||
|
||||
@@ -288,9 +288,12 @@ String NavigationAgent2D::get_configuration_warning() const {
|
||||
|
||||
void NavigationAgent2D::update_navigation() {
|
||||
|
||||
if (agent_parent == nullptr) return;
|
||||
if (navigation == nullptr) return;
|
||||
if (update_frame_id == Engine::get_singleton()->get_physics_frames()) return;
|
||||
if (agent_parent == nullptr)
|
||||
return;
|
||||
if (navigation == nullptr)
|
||||
return;
|
||||
if (update_frame_id == Engine::get_singleton()->get_physics_frames())
|
||||
return;
|
||||
|
||||
update_frame_id = Engine::get_singleton()->get_physics_frames();
|
||||
|
||||
|
||||
@@ -1394,7 +1394,8 @@ Vector2 KinematicCollision2D::get_remainder() const {
|
||||
return collision.remainder;
|
||||
}
|
||||
Object *KinematicCollision2D::get_local_shape() const {
|
||||
if (!owner) return nullptr;
|
||||
if (!owner)
|
||||
return nullptr;
|
||||
uint32_t ownerid = owner->shape_find_owner(collision.local_shape);
|
||||
return owner->shape_owner_get_owner(ownerid);
|
||||
}
|
||||
|
||||
@@ -1355,7 +1355,8 @@ bool TileMap::get_collision_use_parent() const {
|
||||
|
||||
void TileMap::set_collision_use_parent(bool p_use_parent) {
|
||||
|
||||
if (use_parent == p_use_parent) return;
|
||||
if (use_parent == p_use_parent)
|
||||
return;
|
||||
|
||||
_clear_quadrants();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user