You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Fix double get_singleton()
Signed-off-by: Quentin Guidée <quentin.guidee@gmail.com>
This commit is contained in:
@@ -74,7 +74,7 @@ bool GridMap::_set(const StringName &p_name, const Variant &p_value) {
|
|||||||
bm.mesh = meshes[i];
|
bm.mesh = meshes[i];
|
||||||
ERR_CONTINUE(!bm.mesh.is_valid());
|
ERR_CONTINUE(!bm.mesh.is_valid());
|
||||||
bm.instance = RS::get_singleton()->instance_create();
|
bm.instance = RS::get_singleton()->instance_create();
|
||||||
RS::get_singleton()->get_singleton()->instance_set_base(bm.instance, bm.mesh->get_rid());
|
RS::get_singleton()->instance_set_base(bm.instance, bm.mesh->get_rid());
|
||||||
RS::get_singleton()->instance_attach_object_instance_id(bm.instance, get_instance_id());
|
RS::get_singleton()->instance_attach_object_instance_id(bm.instance, get_instance_id());
|
||||||
if (is_inside_tree()) {
|
if (is_inside_tree()) {
|
||||||
RS::get_singleton()->instance_set_scenario(bm.instance, get_world_3d()->get_scenario());
|
RS::get_singleton()->instance_set_scenario(bm.instance, get_world_3d()->get_scenario());
|
||||||
@@ -1296,7 +1296,7 @@ void GridMap::make_baked_meshes(bool p_gen_lightmap_uv, float p_lightmap_uv_texe
|
|||||||
BakedMesh bm;
|
BakedMesh bm;
|
||||||
bm.mesh = mesh;
|
bm.mesh = mesh;
|
||||||
bm.instance = RS::get_singleton()->instance_create();
|
bm.instance = RS::get_singleton()->instance_create();
|
||||||
RS::get_singleton()->get_singleton()->instance_set_base(bm.instance, bm.mesh->get_rid());
|
RS::get_singleton()->instance_set_base(bm.instance, bm.mesh->get_rid());
|
||||||
RS::get_singleton()->instance_attach_object_instance_id(bm.instance, get_instance_id());
|
RS::get_singleton()->instance_attach_object_instance_id(bm.instance, get_instance_id());
|
||||||
if (is_inside_tree()) {
|
if (is_inside_tree()) {
|
||||||
RS::get_singleton()->instance_set_scenario(bm.instance, get_world_3d()->get_scenario());
|
RS::get_singleton()->instance_set_scenario(bm.instance, get_world_3d()->get_scenario());
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ void Joint2D::_update_joint(bool p_only_free) {
|
|||||||
|
|
||||||
ERR_FAIL_COND_MSG(!joint.is_valid(), "Failed to configure the joint.");
|
ERR_FAIL_COND_MSG(!joint.is_valid(), "Failed to configure the joint.");
|
||||||
|
|
||||||
PhysicsServer2D::get_singleton()->get_singleton()->joint_set_param(joint, PhysicsServer2D::JOINT_PARAM_BIAS, bias);
|
PhysicsServer2D::get_singleton()->joint_set_param(joint, PhysicsServer2D::JOINT_PARAM_BIAS, bias);
|
||||||
|
|
||||||
ba = body_a->get_rid();
|
ba = body_a->get_rid();
|
||||||
bb = body_b->get_rid();
|
bb = body_b->get_rid();
|
||||||
@@ -188,7 +188,7 @@ void Joint2D::_notification(int p_what) {
|
|||||||
void Joint2D::set_bias(real_t p_bias) {
|
void Joint2D::set_bias(real_t p_bias) {
|
||||||
bias = p_bias;
|
bias = p_bias;
|
||||||
if (joint.is_valid()) {
|
if (joint.is_valid()) {
|
||||||
PhysicsServer2D::get_singleton()->get_singleton()->joint_set_param(joint, PhysicsServer2D::JOINT_PARAM_BIAS, bias);
|
PhysicsServer2D::get_singleton()->joint_set_param(joint, PhysicsServer2D::JOINT_PARAM_BIAS, bias);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1726,13 +1726,13 @@ void LightStorage::lightmap_set_textures(RID p_lightmap, RID p_light, bool p_use
|
|||||||
|
|
||||||
//erase lightmap users
|
//erase lightmap users
|
||||||
if (lm->light_texture.is_valid()) {
|
if (lm->light_texture.is_valid()) {
|
||||||
TextureStorage::Texture *t = texture_storage->get_singleton()->get_texture(lm->light_texture);
|
TextureStorage::Texture *t = texture_storage->get_texture(lm->light_texture);
|
||||||
if (t) {
|
if (t) {
|
||||||
t->lightmap_users.erase(p_lightmap);
|
t->lightmap_users.erase(p_lightmap);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TextureStorage::Texture *t = texture_storage->get_singleton()->get_texture(p_light);
|
TextureStorage::Texture *t = texture_storage->get_texture(p_light);
|
||||||
lm->light_texture = p_light;
|
lm->light_texture = p_light;
|
||||||
lm->uses_spherical_harmonics = p_uses_spherical_haromics;
|
lm->uses_spherical_harmonics = p_uses_spherical_haromics;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user