summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorHugo Locurcio <hugo.locurcio@hugo.pro>2021-08-11 02:35:16 +0200
committerHugo Locurcio <hugo.locurcio@hugo.pro>2021-08-11 02:37:02 +0200
commit937c1a716c87e48ba0d1c097747e0438dc076f67 (patch)
tree956f3f725bab532a92f0c96a97fd93291d4eca08 /core
parent18bd0fee5a8aa360177cbe14a16d6be69f088d8f (diff)
Rename `iterations_per_second` to `physics_ticks_per_second`
This makes it clearer that this property is only about physics FPS, not rendering FPS. The `physics_fps` project setting was also renamed to `physics_ticks_per_second` for consistency.
Diffstat (limited to 'core')
-rw-r--r--core/config/engine.cpp4
-rw-r--r--core/config/engine.h4
-rw-r--r--core/core_bind.cpp14
-rw-r--r--core/core_bind.h4
4 files changed, 13 insertions, 13 deletions
diff --git a/core/config/engine.cpp b/core/config/engine.cpp
index 3ffd8ee46b..495670bc88 100644
--- a/core/config/engine.cpp
+++ b/core/config/engine.cpp
@@ -37,12 +37,12 @@
#include "core/version.h"
#include "core/version_hash.gen.h"
-void Engine::set_iterations_per_second(int p_ips) {
+void Engine::set_physics_ticks_per_second(int p_ips) {
ERR_FAIL_COND_MSG(p_ips <= 0, "Engine iterations per second must be greater than 0.");
ips = p_ips;
}
-int Engine::get_iterations_per_second() const {
+int Engine::get_physics_ticks_per_second() const {
return ips;
}
diff --git a/core/config/engine.h b/core/config/engine.h
index 3b3e5825b2..e6b5df2d5a 100644
--- a/core/config/engine.h
+++ b/core/config/engine.h
@@ -78,8 +78,8 @@ private:
public:
static Engine *get_singleton();
- virtual void set_iterations_per_second(int p_ips);
- virtual int get_iterations_per_second() const;
+ virtual void set_physics_ticks_per_second(int p_ips);
+ virtual int get_physics_ticks_per_second() const;
void set_physics_jitter_fix(double p_threshold);
double get_physics_jitter_fix() const;
diff --git a/core/core_bind.cpp b/core/core_bind.cpp
index 76c918a92f..f3f51e57ee 100644
--- a/core/core_bind.cpp
+++ b/core/core_bind.cpp
@@ -2077,12 +2077,12 @@ void _ClassDB::_bind_methods() {
////// _Engine //////
-void _Engine::set_iterations_per_second(int p_ips) {
- Engine::get_singleton()->set_iterations_per_second(p_ips);
+void _Engine::set_physics_ticks_per_second(int p_ips) {
+ Engine::get_singleton()->set_physics_ticks_per_second(p_ips);
}
-int _Engine::get_iterations_per_second() const {
- return Engine::get_singleton()->get_iterations_per_second();
+int _Engine::get_physics_ticks_per_second() const {
+ return Engine::get_singleton()->get_physics_ticks_per_second();
}
void _Engine::set_physics_jitter_fix(double p_threshold) {
@@ -2187,8 +2187,8 @@ bool _Engine::is_printing_error_messages() const {
}
void _Engine::_bind_methods() {
- ClassDB::bind_method(D_METHOD("set_iterations_per_second", "iterations_per_second"), &_Engine::set_iterations_per_second);
- ClassDB::bind_method(D_METHOD("get_iterations_per_second"), &_Engine::get_iterations_per_second);
+ ClassDB::bind_method(D_METHOD("set_physics_ticks_per_second", "physics_ticks_per_second"), &_Engine::set_physics_ticks_per_second);
+ ClassDB::bind_method(D_METHOD("get_physics_ticks_per_second"), &_Engine::get_physics_ticks_per_second);
ClassDB::bind_method(D_METHOD("set_physics_jitter_fix", "physics_jitter_fix"), &_Engine::set_physics_jitter_fix);
ClassDB::bind_method(D_METHOD("get_physics_jitter_fix"), &_Engine::get_physics_jitter_fix);
ClassDB::bind_method(D_METHOD("get_physics_interpolation_fraction"), &_Engine::get_physics_interpolation_fraction);
@@ -2225,7 +2225,7 @@ void _Engine::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "editor_hint"), "set_editor_hint", "is_editor_hint");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "print_error_messages"), "set_print_error_messages", "is_printing_error_messages");
- ADD_PROPERTY(PropertyInfo(Variant::INT, "iterations_per_second"), "set_iterations_per_second", "get_iterations_per_second");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "physics_ticks_per_second"), "set_physics_ticks_per_second", "get_physics_ticks_per_second");
ADD_PROPERTY(PropertyInfo(Variant::INT, "target_fps"), "set_target_fps", "get_target_fps");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "time_scale"), "set_time_scale", "get_time_scale");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "physics_jitter_fix"), "set_physics_jitter_fix", "get_physics_jitter_fix");
diff --git a/core/core_bind.h b/core/core_bind.h
index 8736e6ffd8..9060aff340 100644
--- a/core/core_bind.h
+++ b/core/core_bind.h
@@ -623,8 +623,8 @@ protected:
public:
static _Engine *get_singleton() { return singleton; }
- void set_iterations_per_second(int p_ips);
- int get_iterations_per_second() const;
+ void set_physics_ticks_per_second(int p_ips);
+ int get_physics_ticks_per_second() const;
void set_physics_jitter_fix(double p_threshold);
double get_physics_jitter_fix() const;