summaryrefslogtreecommitdiff
path: root/servers
diff options
context:
space:
mode:
authorMax Hilbrunner <mhilbrunner@users.noreply.github.com>2018-07-17 16:53:09 +0200
committerGitHub <noreply@github.com>2018-07-17 16:53:09 +0200
commitf694dcec83ecd343856dc0b9f6a13bf3087ba4e4 (patch)
tree218b17d2bcb138d1bdd532d6c70bf723942eaa4c /servers
parent4b626dc1149a523c1a1d05064994521d1460e527 (diff)
parent277793439ab026476fbdccd5d3f0070284d732ea (diff)
Merge pull request #20222 from godotengine/revert-19764-godot_malbach
Revert "Fix #19507 Not emitted particles affects performance"
Diffstat (limited to 'servers')
-rw-r--r--servers/visual/rasterizer.h1
-rw-r--r--servers/visual/visual_server_raster.h1
-rw-r--r--servers/visual/visual_server_scene.cpp10
-rw-r--r--servers/visual/visual_server_wrap_mt.h1
-rw-r--r--servers/visual_server.cpp1
-rw-r--r--servers/visual_server.h1
6 files changed, 4 insertions, 11 deletions
diff --git a/servers/visual/rasterizer.h b/servers/visual/rasterizer.h
index 72ae53d62d..0b37d266e7 100644
--- a/servers/visual/rasterizer.h
+++ b/servers/visual/rasterizer.h
@@ -482,7 +482,6 @@ public:
virtual void particles_set_emitting(RID p_particles, bool p_emitting) = 0;
virtual bool particles_get_emitting(RID p_particles) = 0;
- virtual bool particles_get_inactive(RID p_particles) = 0;
virtual void particles_set_amount(RID p_particles, int p_amount) = 0;
virtual void particles_set_lifetime(RID p_particles, float p_lifetime) = 0;
diff --git a/servers/visual/visual_server_raster.h b/servers/visual/visual_server_raster.h
index d3221d9398..ec0d02ed2a 100644
--- a/servers/visual/visual_server_raster.h
+++ b/servers/visual/visual_server_raster.h
@@ -396,7 +396,6 @@ public:
BIND2(particles_set_emitting, RID, bool)
BIND1R(bool, particles_get_emitting, RID)
- BIND1R(bool, particles_get_inactive, RID)
BIND2(particles_set_amount, RID, int)
BIND2(particles_set_lifetime, RID, float)
BIND2(particles_set_one_shot, RID, bool)
diff --git a/servers/visual/visual_server_scene.cpp b/servers/visual/visual_server_scene.cpp
index b8c90cffa1..697c890c9a 100644
--- a/servers/visual/visual_server_scene.cpp
+++ b/servers/visual/visual_server_scene.cpp
@@ -1872,12 +1872,10 @@ void VisualServerScene::_prepare_scene(const Transform p_cam_transform, const Ca
InstanceGeometryData *geom = static_cast<InstanceGeometryData *>(ins->base_data);
if (ins->base_type == VS::INSTANCE_PARTICLES) {
- if (VSG::storage->particles_get_emitting(ins->base) || !VSG::storage->particles_get_inactive(ins->base)) {
- //particles visible? process them
- VSG::storage->particles_request_process(ins->base);
- //particles visible? request redraw
- VisualServerRaster::redraw_request();
- }
+ //particles visible? process them
+ VSG::storage->particles_request_process(ins->base);
+ //particles visible? request redraw
+ VisualServerRaster::redraw_request();
}
if (geom->lighting_dirty) {
diff --git a/servers/visual/visual_server_wrap_mt.h b/servers/visual/visual_server_wrap_mt.h
index e98856aaca..48f0ec46f3 100644
--- a/servers/visual/visual_server_wrap_mt.h
+++ b/servers/visual/visual_server_wrap_mt.h
@@ -328,7 +328,6 @@ public:
FUNC2(particles_set_emitting, RID, bool)
FUNC1R(bool, particles_get_emitting, RID)
- FUNC1R(bool, particles_get_inactive, RID)
FUNC2(particles_set_amount, RID, int)
FUNC2(particles_set_lifetime, RID, float)
FUNC2(particles_set_one_shot, RID, bool)
diff --git a/servers/visual_server.cpp b/servers/visual_server.cpp
index c56dfd4cc4..dffaccc0d4 100644
--- a/servers/visual_server.cpp
+++ b/servers/visual_server.cpp
@@ -1699,7 +1699,6 @@ void VisualServer::_bind_methods() {
ClassDB::bind_method(D_METHOD("particles_create"), &VisualServer::particles_create);
ClassDB::bind_method(D_METHOD("particles_set_emitting", "particles", "emitting"), &VisualServer::particles_set_emitting);
ClassDB::bind_method(D_METHOD("particles_get_emitting", "particles"), &VisualServer::particles_get_emitting);
- ClassDB::bind_method(D_METHOD("particles_get_inactive", "particles"), &VisualServer::particles_get_inactive);
ClassDB::bind_method(D_METHOD("particles_set_amount", "particles", "amount"), &VisualServer::particles_set_amount);
ClassDB::bind_method(D_METHOD("particles_set_lifetime", "particles", "lifetime"), &VisualServer::particles_set_lifetime);
ClassDB::bind_method(D_METHOD("particles_set_one_shot", "particles", "one_shot"), &VisualServer::particles_set_one_shot);
diff --git a/servers/visual_server.h b/servers/visual_server.h
index 012c93425a..968cb852ed 100644
--- a/servers/visual_server.h
+++ b/servers/visual_server.h
@@ -519,7 +519,6 @@ public:
virtual void particles_set_emitting(RID p_particles, bool p_emitting) = 0;
virtual bool particles_get_emitting(RID p_particles) = 0;
- virtual bool particles_get_inactive(RID p_particles) = 0;
virtual void particles_set_amount(RID p_particles, int p_amount) = 0;
virtual void particles_set_lifetime(RID p_particles, float p_lifetime) = 0;
virtual void particles_set_one_shot(RID p_particles, bool p_one_shot) = 0;