summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Haas <Hinsbart@users.noreply.github.com>2017-10-02 23:10:36 +0200
committerGitHub <noreply@github.com>2017-10-02 23:10:36 +0200
commit5303efb2fabd668bef18b7ac7606426692e5d6bb (patch)
treeb699146047e60501afbfa09c36161d8ae408a223
parent1e9465096d9c738057aad81d5046b85777155f87 (diff)
parent4537977d6dd2a76580d9ab611a18634efab55c74 (diff)
Merge pull request #11659 from AndreaCatania/prephysics
Renamed fixed_process to physics_process
-rw-r--r--core/bind/core_bind.cpp6
-rw-r--r--core/bind/core_bind.h2
-rw-r--r--core/engine.cpp4
-rw-r--r--core/engine.h8
-rw-r--r--core/script_debugger_local.cpp10
-rw-r--r--core/script_debugger_local.h4
-rw-r--r--core/script_debugger_remote.cpp14
-rw-r--r--core/script_debugger_remote.h4
-rw-r--r--core/script_language.h2
-rw-r--r--editor/editor_profiler.cpp8
-rw-r--r--editor/editor_profiler.h6
-rw-r--r--editor/plugins/animation_tree_editor_plugin.cpp4
-rw-r--r--editor/plugins/canvas_item_editor_plugin.cpp6
-rw-r--r--editor/plugins/collision_polygon_2d_editor_plugin.cpp2
-rw-r--r--editor/plugins/light_occluder_2d_editor_plugin.cpp2
-rw-r--r--editor/plugins/material_editor_plugin.cpp2
-rw-r--r--editor/plugins/mesh_editor_plugin.cpp2
-rw-r--r--editor/plugins/navigation_polygon_editor_plugin.cpp2
-rw-r--r--editor/plugins/path_2d_editor_plugin.cpp2
-rw-r--r--editor/plugins/polygon_2d_editor_plugin.cpp2
-rw-r--r--editor/plugins/resource_preloader_editor_plugin.cpp4
-rw-r--r--editor/plugins/spatial_editor_plugin.cpp2
-rw-r--r--editor/plugins/sprite_frames_editor_plugin.cpp4
-rw-r--r--editor/plugins/texture_editor_plugin.cpp2
-rw-r--r--editor/property_editor.cpp6
-rw-r--r--editor/script_editor_debugger.cpp12
-rw-r--r--main/input_default.cpp14
-rw-r--r--main/input_default.h2
-rw-r--r--main/main.cpp20
-rw-r--r--main/performance.cpp12
-rw-r--r--main/performance.h6
-rw-r--r--modules/visual_script/visual_script.cpp4
-rw-r--r--modules/visual_script/visual_script_yield_nodes.cpp8
-rw-r--r--modules/visual_script/visual_script_yield_nodes.h2
-rw-r--r--scene/2d/audio_stream_player_2d.cpp8
-rw-r--r--scene/2d/camera_2d.cpp12
-rw-r--r--scene/2d/physics_body_2d.cpp2
-rw-r--r--scene/2d/ray_cast_2d.cpp10
-rw-r--r--scene/2d/visibility_notifier_2d.cpp18
-rw-r--r--scene/2d/visibility_notifier_2d.h2
-rw-r--r--scene/3d/audio_stream_player_3d.cpp12
-rw-r--r--scene/3d/audio_stream_player_3d.h2
-rw-r--r--scene/3d/camera.cpp4
-rw-r--r--scene/3d/camera.h2
-rw-r--r--scene/3d/interpolated_camera.cpp2
-rw-r--r--scene/3d/physics_body.cpp2
-rw-r--r--scene/3d/ray_cast.cpp10
-rw-r--r--scene/3d/spatial_velocity_tracker.cpp28
-rw-r--r--scene/3d/spatial_velocity_tracker.h6
-rw-r--r--scene/animation/animation_player.cpp12
-rw-r--r--scene/animation/animation_player.h2
-rw-r--r--scene/animation/animation_tree_player.cpp12
-rw-r--r--scene/animation/animation_tree_player.h2
-rw-r--r--scene/animation/tween.cpp12
-rw-r--r--scene/animation/tween.h2
-rw-r--r--scene/gui/scroll_bar.cpp28
-rw-r--r--scene/gui/scroll_container.cpp22
-rw-r--r--scene/gui/text_edit.cpp12
-rw-r--r--scene/gui/tree.cpp22
-rwxr-xr-xscene/main/node.cpp76
-rw-r--r--scene/main/node.h18
-rw-r--r--scene/main/scene_tree.cpp12
-rw-r--r--scene/main/scene_tree.h4
-rwxr-xr-xscene/main/timer.cpp20
-rwxr-xr-xscene/main/timer.h2
-rw-r--r--scene/main/viewport.cpp6
-rw-r--r--scene/scene_string_names.cpp2
-rw-r--r--scene/scene_string_names.h2
-rw-r--r--servers/physics/physics_server_sw.cpp2
-rw-r--r--servers/physics/physics_server_sw.h2
-rw-r--r--servers/physics_2d/physics_2d_server_sw.cpp2
-rw-r--r--servers/physics_2d/physics_2d_server_sw.h2
-rw-r--r--servers/physics_2d/physics_2d_server_wrap_mt.h2
-rw-r--r--servers/physics_2d_server.h2
-rw-r--r--servers/physics_server.h2
75 files changed, 296 insertions, 296 deletions
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp
index 2477b1b187..f47d540351 100644
--- a/core/bind/core_bind.cpp
+++ b/core/bind/core_bind.cpp
@@ -2557,8 +2557,8 @@ Dictionary _Engine::get_version_info() const {
return Engine::get_singleton()->get_version_info();
}
-bool _Engine::is_in_fixed_frame() const {
- return Engine::get_singleton()->is_in_fixed_frame();
+bool _Engine::is_in_physics_frame() const {
+ return Engine::get_singleton()->is_in_physics_frame();
}
void _Engine::set_editor_hint(bool p_enabled) {
@@ -2588,7 +2588,7 @@ void _Engine::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_version_info"), &_Engine::get_version_info);
- ClassDB::bind_method(D_METHOD("is_in_fixed_frame"), &_Engine::is_in_fixed_frame);
+ ClassDB::bind_method(D_METHOD("is_in_physics_frame"), &_Engine::is_in_physics_frame);
ClassDB::bind_method(D_METHOD("set_editor_hint", "enabled"), &_Engine::set_editor_hint);
ClassDB::bind_method(D_METHOD("is_editor_hint"), &_Engine::is_editor_hint);
diff --git a/core/bind/core_bind.h b/core/bind/core_bind.h
index 1a22d45932..f12ab9f000 100644
--- a/core/bind/core_bind.h
+++ b/core/bind/core_bind.h
@@ -661,7 +661,7 @@ public:
Dictionary get_version_info() const;
- bool is_in_fixed_frame() const;
+ bool is_in_physics_frame() const;
void set_editor_hint(bool p_enabled);
bool is_editor_hint() const;
diff --git a/core/engine.cpp b/core/engine.cpp
index d73693dc12..c609ae9520 100644
--- a/core/engine.cpp
+++ b/core/engine.cpp
@@ -116,9 +116,9 @@ Engine::Engine() {
_target_fps = 0;
_time_scale = 1.0;
_pixel_snap = false;
- _fixed_frames = 0;
+ _physics_frames = 0;
_idle_frames = 0;
- _in_fixed = false;
+ _in_physics = false;
_frame_ticks = 0;
_frame_step = 0;
editor_hint = false;
diff --git a/core/engine.h b/core/engine.h
index 6f46ec8923..3b4979582f 100644
--- a/core/engine.h
+++ b/core/engine.h
@@ -49,10 +49,10 @@ class Engine {
int _target_fps;
float _time_scale;
bool _pixel_snap;
- uint64_t _fixed_frames;
+ uint64_t _physics_frames;
uint64_t _idle_frames;
- bool _in_fixed;
+ bool _in_physics;
bool editor_hint;
@@ -71,9 +71,9 @@ public:
uint64_t get_frames_drawn();
- uint64_t get_fixed_frames() const { return _fixed_frames; }
+ uint64_t get_physics_frames() const { return _physics_frames; }
uint64_t get_idle_frames() const { return _idle_frames; }
- bool is_in_fixed_frame() const { return _in_fixed; }
+ bool is_in_physics_frame() const { return _in_physics; }
uint64_t get_idle_frame_ticks() const { return _frame_ticks; }
float get_idle_frame_step() const { return _frame_step; }
diff --git a/core/script_debugger_local.cpp b/core/script_debugger_local.cpp
index c2632da38b..8d2600e52d 100644
--- a/core/script_debugger_local.cpp
+++ b/core/script_debugger_local.cpp
@@ -186,12 +186,12 @@ struct _ScriptDebuggerLocalProfileInfoSort {
}
};
-void ScriptDebuggerLocal::profiling_set_frame_times(float p_frame_time, float p_idle_time, float p_fixed_time, float p_fixed_frame_time) {
+void ScriptDebuggerLocal::profiling_set_frame_times(float p_frame_time, float p_idle_time, float p_physics_time, float p_physics_frame_time) {
frame_time = p_frame_time;
idle_time = p_idle_time;
- fixed_time = p_fixed_time;
- fixed_frame_time = p_fixed_frame_time;
+ physics_time = p_physics_time;
+ physics_frame_time = p_physics_frame_time;
}
void ScriptDebuggerLocal::idle_poll() {
@@ -250,9 +250,9 @@ void ScriptDebuggerLocal::profiling_start() {
profiling = true;
pinfo.resize(32768);
frame_time = 0;
- fixed_time = 0;
+ physics_time = 0;
idle_time = 0;
- fixed_frame_time = 0;
+ physics_frame_time = 0;
}
void ScriptDebuggerLocal::profiling_end() {
diff --git a/core/script_debugger_local.h b/core/script_debugger_local.h
index 097c7c41f3..91f787052c 100644
--- a/core/script_debugger_local.h
+++ b/core/script_debugger_local.h
@@ -35,7 +35,7 @@
class ScriptDebuggerLocal : public ScriptDebugger {
bool profiling;
- float frame_time, idle_time, fixed_time, fixed_frame_time;
+ float frame_time, idle_time, physics_time, physics_frame_time;
uint64_t idle_accum;
Vector<ScriptLanguage::ProfilingInfo> pinfo;
@@ -51,7 +51,7 @@ public:
virtual void profiling_start();
virtual void profiling_end();
- virtual void profiling_set_frame_times(float p_frame_time, float p_idle_time, float p_fixed_time, float p_fixed_frame_time);
+ virtual void profiling_set_frame_times(float p_frame_time, float p_idle_time, float p_physics_time, float p_physics_frame_time);
ScriptDebuggerLocal();
};
diff --git a/core/script_debugger_remote.cpp b/core/script_debugger_remote.cpp
index f0097054b1..4653ade294 100644
--- a/core/script_debugger_remote.cpp
+++ b/core/script_debugger_remote.cpp
@@ -647,8 +647,8 @@ void ScriptDebuggerRemote::_poll_events() {
profiling = true;
frame_time = 0;
idle_time = 0;
- fixed_time = 0;
- fixed_frame_time = 0;
+ physics_time = 0;
+ physics_frame_time = 0;
print_line("PROFILING ALRIGHT!");
@@ -727,8 +727,8 @@ void ScriptDebuggerRemote::_send_profiling_data(bool p_for_frame) {
packet_peer_stream->put_var(Engine::get_singleton()->get_frames_drawn()); //total frame time
packet_peer_stream->put_var(frame_time); //total frame time
packet_peer_stream->put_var(idle_time); //idle frame time
- packet_peer_stream->put_var(fixed_time); //fixed frame time
- packet_peer_stream->put_var(fixed_frame_time); //fixed frame time
+ packet_peer_stream->put_var(physics_time); //fixed frame time
+ packet_peer_stream->put_var(physics_frame_time); //fixed frame time
packet_peer_stream->put_var(USEC_TO_SEC(total_script_time)); //total script execution time
@@ -917,12 +917,12 @@ void ScriptDebuggerRemote::profiling_end() {
//ignores this, uses it via connnection
}
-void ScriptDebuggerRemote::profiling_set_frame_times(float p_frame_time, float p_idle_time, float p_fixed_time, float p_fixed_frame_time) {
+void ScriptDebuggerRemote::profiling_set_frame_times(float p_frame_time, float p_idle_time, float p_physics_time, float p_physics_frame_time) {
frame_time = p_frame_time;
idle_time = p_idle_time;
- fixed_time = p_fixed_time;
- fixed_frame_time = p_fixed_frame_time;
+ physics_time = p_physics_time;
+ physics_frame_time = p_physics_frame_time;
}
ScriptDebuggerRemote::ResourceUsageFunc ScriptDebuggerRemote::resource_usage_func = NULL;
diff --git a/core/script_debugger_remote.h b/core/script_debugger_remote.h
index b1ef88b812..22137d1350 100644
--- a/core/script_debugger_remote.h
+++ b/core/script_debugger_remote.h
@@ -54,7 +54,7 @@ class ScriptDebuggerRemote : public ScriptDebugger {
Vector<ScriptLanguage::ProfilingInfo *> profile_info_ptrs;
Map<StringName, int> profiler_function_signature_map;
- float frame_time, idle_time, fixed_time, fixed_frame_time;
+ float frame_time, idle_time, physics_time, physics_frame_time;
bool profiling;
int max_frame_functions;
@@ -161,7 +161,7 @@ public:
virtual void profiling_start();
virtual void profiling_end();
- virtual void profiling_set_frame_times(float p_frame_time, float p_idle_time, float p_fixed_time, float p_fixed_frame_time);
+ virtual void profiling_set_frame_times(float p_frame_time, float p_idle_time, float p_physics_time, float p_physics_frame_time);
ScriptDebuggerRemote();
~ScriptDebuggerRemote();
diff --git a/core/script_language.h b/core/script_language.h
index 2261737f9a..25767a2f7a 100644
--- a/core/script_language.h
+++ b/core/script_language.h
@@ -397,7 +397,7 @@ public:
virtual void add_profiling_frame_data(const StringName &p_name, const Array &p_data) = 0;
virtual void profiling_start() = 0;
virtual void profiling_end() = 0;
- virtual void profiling_set_frame_times(float p_frame_time, float p_idle_time, float p_fixed_time, float p_fixed_frame_time) = 0;
+ virtual void profiling_set_frame_times(float p_frame_time, float p_idle_time, float p_physics_time, float p_physics_frame_time) = 0;
ScriptDebugger();
virtual ~ScriptDebugger() { singleton = NULL; }
diff --git a/editor/editor_profiler.cpp b/editor/editor_profiler.cpp
index 247775fa1d..968d8b831e 100644
--- a/editor/editor_profiler.cpp
+++ b/editor/editor_profiler.cpp
@@ -89,7 +89,7 @@ void EditorProfiler::clear() {
variables->clear();
//activate->set_pressed(false);
plot_sigs.clear();
- plot_sigs.insert("fixed_frame_time");
+ plot_sigs.insert("physics_frame_time");
plot_sigs.insert("category_frame_time");
updating_frame = true;
@@ -120,9 +120,9 @@ String EditorProfiler::_get_time_as_text(Metric &m, float p_time, int p_calls) {
return rtos(p_time / p_calls);
} else if (dmode == DISPLAY_FRAME_PERCENT) {
return _get_percent_txt(p_time, m.frame_time);
- } else if (dmode == DISPLAY_FIXED_FRAME_PERCENT) {
+ } else if (dmode == DISPLAY_PHYSICS_FRAME_PERCENT) {
- return _get_percent_txt(p_time, m.fixed_frame_time);
+ return _get_percent_txt(p_time, m.physics_frame_time);
}
return "err";
@@ -714,7 +714,7 @@ EditorProfiler::EditorProfiler() {
add_child(plot_delay);
plot_delay->connect("timeout", this, "_update_plot");
- plot_sigs.insert("fixed_frame_time");
+ plot_sigs.insert("physics_frame_time");
plot_sigs.insert("category_frame_time");
seeking = false;
diff --git a/editor/editor_profiler.h b/editor/editor_profiler.h
index e2d781f125..e9e88ed7f2 100644
--- a/editor/editor_profiler.h
+++ b/editor/editor_profiler.h
@@ -51,8 +51,8 @@ public:
int frame_number;
float frame_time;
float idle_time;
- float fixed_time;
- float fixed_frame_time;
+ float physics_time;
+ float physics_frame_time;
struct Category {
@@ -89,7 +89,7 @@ public:
DISPLAY_FRAME_TIME,
DISPLAY_AVERAGE_TIME,
DISPLAY_FRAME_PERCENT,
- DISPLAY_FIXED_FRAME_PERCENT,
+ DISPLAY_PHYSICS_FRAME_PERCENT,
};
enum DisplayTime {
diff --git a/editor/plugins/animation_tree_editor_plugin.cpp b/editor/plugins/animation_tree_editor_plugin.cpp
index 4dd877a6ee..22d23e1c72 100644
--- a/editor/plugins/animation_tree_editor_plugin.cpp
+++ b/editor/plugins/animation_tree_editor_plugin.cpp
@@ -1419,13 +1419,13 @@ void AnimationTreeEditorPlugin::make_visible(bool p_visible) {
//editor->animation_panel_make_visible(true);
button->show();
editor->make_bottom_panel_item_visible(anim_tree_editor);
- anim_tree_editor->set_fixed_process(true);
+ anim_tree_editor->set_physics_process(true);
} else {
if (anim_tree_editor->is_visible_in_tree())
editor->hide_bottom_panel();
button->hide();
- anim_tree_editor->set_fixed_process(false);
+ anim_tree_editor->set_physics_process(false);
}
}
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp
index 3310f1f496..1aa24c8172 100644
--- a/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/editor/plugins/canvas_item_editor_plugin.cpp
@@ -2685,7 +2685,7 @@ void CanvasItemEditor::_draw_viewport() {
void CanvasItemEditor::_notification(int p_what) {
- if (p_what == NOTIFICATION_FIXED_PROCESS) {
+ if (p_what == NOTIFICATION_PHYSICS_PROCESS) {
EditorNode::get_singleton()->get_scene_root()->set_snap_controls_to_pixels(GLOBAL_GET("gui/common/snap_controls_to_pixels"));
@@ -4010,14 +4010,14 @@ void CanvasItemEditorPlugin::make_visible(bool p_visible) {
if (p_visible) {
canvas_item_editor->show();
- canvas_item_editor->set_fixed_process(true);
+ canvas_item_editor->set_physics_process(true);
VisualServer::get_singleton()->viewport_set_hide_canvas(editor->get_scene_root()->get_viewport_rid(), false);
canvas_item_editor->viewport_base->grab_focus();
} else {
canvas_item_editor->hide();
- canvas_item_editor->set_fixed_process(false);
+ canvas_item_editor->set_physics_process(false);
VisualServer::get_singleton()->viewport_set_hide_canvas(editor->get_scene_root()->get_viewport_rid(), true);
}
}
diff --git a/editor/plugins/collision_polygon_2d_editor_plugin.cpp b/editor/plugins/collision_polygon_2d_editor_plugin.cpp
index 38f95d8278..4501136e19 100644
--- a/editor/plugins/collision_polygon_2d_editor_plugin.cpp
+++ b/editor/plugins/collision_polygon_2d_editor_plugin.cpp
@@ -45,7 +45,7 @@ void CollisionPolygon2DEditor::_notification(int p_what) {
get_tree()->connect("node_removed", this, "_node_removed");
} break;
- case NOTIFICATION_FIXED_PROCESS: {
+ case NOTIFICATION_PHYSICS_PROCESS: {
} break;
}
diff --git a/editor/plugins/light_occluder_2d_editor_plugin.cpp b/editor/plugins/light_occluder_2d_editor_plugin.cpp
index e6b921c539..ed0bc60d2f 100644
--- a/editor/plugins/light_occluder_2d_editor_plugin.cpp
+++ b/editor/plugins/light_occluder_2d_editor_plugin.cpp
@@ -46,7 +46,7 @@ void LightOccluder2DEditor::_notification(int p_what) {
create_poly->connect("confirmed", this, "_create_poly");
} break;
- case NOTIFICATION_FIXED_PROCESS: {
+ case NOTIFICATION_PHYSICS_PROCESS: {
} break;
}
diff --git a/editor/plugins/material_editor_plugin.cpp b/editor/plugins/material_editor_plugin.cpp
index b96e10e81a..6b613c1bcc 100644
--- a/editor/plugins/material_editor_plugin.cpp
+++ b/editor/plugins/material_editor_plugin.cpp
@@ -44,7 +44,7 @@ void MaterialEditor::_gui_input(InputEvent p_event) {
void MaterialEditor::_notification(int p_what) {
- if (p_what==NOTIFICATION_FIXED_PROCESS) {
+ if (p_what==NOTIFICATION_PHYSICS_PROCESS) {
}
diff --git a/editor/plugins/mesh_editor_plugin.cpp b/editor/plugins/mesh_editor_plugin.cpp
index b775636764..74618aecc2 100644
--- a/editor/plugins/mesh_editor_plugin.cpp
+++ b/editor/plugins/mesh_editor_plugin.cpp
@@ -47,7 +47,7 @@ void MeshEditor::_gui_input(Ref<InputEvent> p_event) {
void MeshEditor::_notification(int p_what) {
- if (p_what == NOTIFICATION_FIXED_PROCESS) {
+ if (p_what == NOTIFICATION_PHYSICS_PROCESS) {
}
if (p_what == NOTIFICATION_READY) {
diff --git a/editor/plugins/navigation_polygon_editor_plugin.cpp b/editor/plugins/navigation_polygon_editor_plugin.cpp
index de8d4f9618..69e553eefb 100644
--- a/editor/plugins/navigation_polygon_editor_plugin.cpp
+++ b/editor/plugins/navigation_polygon_editor_plugin.cpp
@@ -46,7 +46,7 @@ void NavigationPolygonEditor::_notification(int p_what) {
create_nav->connect("confirmed", this, "_create_nav");
} break;
- case NOTIFICATION_FIXED_PROCESS: {
+ case NOTIFICATION_PHYSICS_PROCESS: {
} break;
}
diff --git a/editor/plugins/path_2d_editor_plugin.cpp b/editor/plugins/path_2d_editor_plugin.cpp
index 1160e90384..df10ac8929 100644
--- a/editor/plugins/path_2d_editor_plugin.cpp
+++ b/editor/plugins/path_2d_editor_plugin.cpp
@@ -46,7 +46,7 @@ void Path2DEditor::_notification(int p_what) {
//button_edit->set_pressed(true);
} break;
- case NOTIFICATION_FIXED_PROCESS: {
+ case NOTIFICATION_PHYSICS_PROCESS: {
} break;
}
diff --git a/editor/plugins/polygon_2d_editor_plugin.cpp b/editor/plugins/polygon_2d_editor_plugin.cpp
index 8c4e1b8f27..af2349983d 100644
--- a/editor/plugins/polygon_2d_editor_plugin.cpp
+++ b/editor/plugins/polygon_2d_editor_plugin.cpp
@@ -58,7 +58,7 @@ void Polygon2DEditor::_notification(int p_what) {
get_tree()->connect("node_removed", this, "_node_removed");
} break;
- case NOTIFICATION_FIXED_PROCESS: {
+ case NOTIFICATION_PHYSICS_PROCESS: {
} break;
}
diff --git a/editor/plugins/resource_preloader_editor_plugin.cpp b/editor/plugins/resource_preloader_editor_plugin.cpp
index da4a3f84d6..d421b3798b 100644
--- a/editor/plugins/resource_preloader_editor_plugin.cpp
+++ b/editor/plugins/resource_preloader_editor_plugin.cpp
@@ -38,7 +38,7 @@ void ResourcePreloaderEditor::_gui_input(Ref<InputEvent> p_event) {
void ResourcePreloaderEditor::_notification(int p_what) {
- if (p_what == NOTIFICATION_FIXED_PROCESS) {
+ if (p_what == NOTIFICATION_PHYSICS_PROCESS) {
}
if (p_what == NOTIFICATION_ENTER_TREE) {
@@ -248,7 +248,7 @@ void ResourcePreloaderEditor::edit(ResourcePreloader *p_preloader) {
} else {
hide();
- set_fixed_process(false);
+ set_physics_process(false);
}
}
diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp
index 5ddd1c5b62..69cfc05e2b 100644
--- a/editor/plugins/spatial_editor_plugin.cpp
+++ b/editor/plugins/spatial_editor_plugin.cpp
@@ -1850,7 +1850,7 @@ void SpatialEditorViewport::_notification(int p_what) {
last_message = message;
}
- message_time -= get_fixed_process_delta_time();
+ message_time -= get_physics_process_delta_time();
if (message_time < 0)
surface->update();
}
diff --git a/editor/plugins/sprite_frames_editor_plugin.cpp b/editor/plugins/sprite_frames_editor_plugin.cpp
index b9cb1788f0..3b6eeb61d6 100644
--- a/editor/plugins/sprite_frames_editor_plugin.cpp
+++ b/editor/plugins/sprite_frames_editor_plugin.cpp
@@ -39,7 +39,7 @@ void SpriteFramesEditor::_gui_input(Ref<InputEvent> p_event) {
void SpriteFramesEditor::_notification(int p_what) {
- if (p_what == NOTIFICATION_FIXED_PROCESS) {
+ if (p_what == NOTIFICATION_PHYSICS_PROCESS) {
}
if (p_what == NOTIFICATION_ENTER_TREE) {
@@ -535,7 +535,7 @@ void SpriteFramesEditor::edit(SpriteFrames *p_frames) {
} else {
hide();
- //set_fixed_process(false);
+ //set_physics_process(false);
}
}
diff --git a/editor/plugins/texture_editor_plugin.cpp b/editor/plugins/texture_editor_plugin.cpp
index 90dc4cf993..855e857d80 100644
--- a/editor/plugins/texture_editor_plugin.cpp
+++ b/editor/plugins/texture_editor_plugin.cpp
@@ -38,7 +38,7 @@ void TextureEditor::_gui_input(Ref<InputEvent> p_event) {
void TextureEditor::_notification(int p_what) {
- if (p_what == NOTIFICATION_FIXED_PROCESS) {
+ if (p_what == NOTIFICATION_PHYSICS_PROCESS) {
}
if (p_what == NOTIFICATION_READY) {
diff --git a/editor/property_editor.cpp b/editor/property_editor.cpp
index 1b8a485861..47ebf49c43 100644
--- a/editor/property_editor.cpp
+++ b/editor/property_editor.cpp
@@ -2585,10 +2585,10 @@ void PropertyEditor::_notification(int p_what) {
}
}
- if (p_what == NOTIFICATION_FIXED_PROCESS) {
+ if (p_what == NOTIFICATION_PHYSICS_PROCESS) {
if (refresh_countdown > 0) {
- refresh_countdown -= get_fixed_process_delta_time();
+ refresh_countdown -= get_physics_process_delta_time();
if (refresh_countdown <= 0) {
TreeItem *root = tree->get_root();
_refresh_item(root);
@@ -4227,7 +4227,7 @@ PropertyEditor::PropertyEditor() {
tree->set_drag_forwarding(this);
- set_fixed_process(true);
+ set_physics_process(true);
custom_editor = memnew(CustomPropertyEditor);
add_child(custom_editor);
diff --git a/editor/script_editor_debugger.cpp b/editor/script_editor_debugger.cpp
index c968f4edd4..5ad4674f7f 100644
--- a/editor/script_editor_debugger.cpp
+++ b/editor/script_editor_debugger.cpp
@@ -649,8 +649,8 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da
metric.frame_number = p_data[0];
metric.frame_time = p_data[1];
metric.idle_time = p_data[2];
- metric.fixed_time = p_data[3];
- metric.fixed_frame_time = p_data[4];
+ metric.physics_time = p_data[3];
+ metric.physics_frame_time = p_data[4];
int frame_data_amount = p_data[6];
int frame_function_amount = p_data[7];
@@ -664,9 +664,9 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da
item.calls = 1;
item.line = 0;
item.name = "Fixed Time";
- item.total = metric.fixed_time;
+ item.total = metric.physics_time;
item.self = item.total;
- item.signature = "fixed_time";
+ item.signature = "physics_time";
frame_time.items.push_back(item);
@@ -678,9 +678,9 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da
frame_time.items.push_back(item);
item.name = "Fixed Frame Time";
- item.total = metric.fixed_frame_time;
+ item.total = metric.physics_frame_time;
item.self = item.total;
- item.signature = "fixed_frame_time";
+ item.signature = "physics_frame_time";
frame_time.items.push_back(item);
diff --git a/main/input_default.cpp b/main/input_default.cpp
index 18979c844a..2940f432d5 100644
--- a/main/input_default.cpp
+++ b/main/input_default.cpp
@@ -105,8 +105,8 @@ bool InputDefault::is_action_just_pressed(const StringName &p_action) const {
if (!E)
return false;
- if (Engine::get_singleton()->is_in_fixed_frame()) {
- return E->get().pressed && E->get().fixed_frame == Engine::get_singleton()->get_fixed_frames();
+ if (Engine::get_singleton()->is_in_physics_frame()) {
+ return E->get().pressed && E->get().physics_frame == Engine::get_singleton()->get_physics_frames();
} else {
return E->get().pressed && E->get().idle_frame == Engine::get_singleton()->get_idle_frames();
}
@@ -118,8 +118,8 @@ bool InputDefault::is_action_just_released(const StringName &p_action) const {
if (!E)
return false;
- if (Engine::get_singleton()->is_in_fixed_frame()) {
- return !E->get().pressed && E->get().fixed_frame == Engine::get_singleton()->get_fixed_frames();
+ if (Engine::get_singleton()->is_in_physics_frame()) {
+ return !E->get().pressed && E->get().physics_frame == Engine::get_singleton()->get_physics_frames();
} else {
return !E->get().pressed && E->get().idle_frame == Engine::get_singleton()->get_idle_frames();
}
@@ -324,7 +324,7 @@ void InputDefault::parse_input_event(const Ref<InputEvent> &p_event) {
if (InputMap::get_singleton()->event_is_action(p_event, E->key()) && is_action_pressed(E->key()) != p_event->is_pressed()) {
Action action;
- action.fixed_frame = Engine::get_singleton()->get_fixed_frames();
+ action.physics_frame = Engine::get_singleton()->get_physics_frames();
action.idle_frame = Engine::get_singleton()->get_idle_frames();
action.pressed = p_event->is_pressed();
action_state[E->key()] = action;
@@ -460,7 +460,7 @@ void InputDefault::action_press(const StringName &p_action) {
Action action;
- action.fixed_frame = Engine::get_singleton()->get_fixed_frames();
+ action.physics_frame = Engine::get_singleton()->get_physics_frames();
action.idle_frame = Engine::get_singleton()->get_idle_frames();
action.pressed = true;
@@ -471,7 +471,7 @@ void InputDefault::action_release(const StringName &p_action) {
Action action;
- action.fixed_frame = Engine::get_singleton()->get_fixed_frames();
+ action.physics_frame = Engine::get_singleton()->get_physics_frames();
action.idle_frame = Engine::get_singleton()->get_idle_frames();
action.pressed = false;
diff --git a/main/input_default.h b/main/input_default.h
index 480e78e971..e2cb03e67c 100644
--- a/main/input_default.h
+++ b/main/input_default.h
@@ -51,7 +51,7 @@ class InputDefault : public Input {
MainLoop *main_loop;
struct Action {
- uint64_t fixed_frame;
+ uint64_t physics_frame;
uint64_t idle_frame;
bool pressed;
};
diff --git a/main/main.cpp b/main/main.cpp
index 9096b935c2..f9422cdf0b 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -1574,7 +1574,7 @@ uint32_t Main::frame = 0;
bool Main::force_redraw_requested = false;
//for performance metrics
-static uint64_t fixed_process_max = 0;
+static uint64_t physics_process_max = 0;
static uint64_t idle_process_max = 0;
bool Main::iteration() {
@@ -1597,7 +1597,7 @@ bool Main::iteration() {
return false;
*/
- uint64_t fixed_process_ticks = 0;
+ uint64_t physics_process_ticks = 0;
uint64_t idle_process_ticks = 0;
frame += ticks_elapsed;
@@ -1615,7 +1615,7 @@ bool Main::iteration() {
int iters = 0;
- Engine::get_singleton()->_in_fixed = true;
+ Engine::get_singleton()->_in_physics = true;
while (time_accum > frame_slice) {
@@ -1642,13 +1642,13 @@ bool Main::iteration() {
time_accum -= frame_slice;
message_queue->flush();
- fixed_process_ticks = MAX(fixed_process_ticks, OS::get_singleton()->get_ticks_usec() - fixed_begin); // keep the largest one for reference
- fixed_process_max = MAX(OS::get_singleton()->get_ticks_usec() - fixed_begin, fixed_process_max);
+ physics_process_ticks = MAX(physics_process_ticks, OS::get_singleton()->get_ticks_usec() - fixed_begin); // keep the largest one for reference
+ physics_process_max = MAX(OS::get_singleton()->get_ticks_usec() - fixed_begin, physics_process_max);
iters++;
- Engine::get_singleton()->_fixed_frames++;
+ Engine::get_singleton()->_physics_frames++;
}
- Engine::get_singleton()->_in_fixed = false;
+ Engine::get_singleton()->_in_physics = false;
uint64_t idle_begin = OS::get_singleton()->get_ticks_usec();
@@ -1684,7 +1684,7 @@ bool Main::iteration() {
if (script_debugger) {
if (script_debugger->is_profiling()) {
- script_debugger->profiling_set_frame_times(USEC_TO_SEC(frame_time), USEC_TO_SEC(idle_process_ticks), USEC_TO_SEC(fixed_process_ticks), frame_slice);
+ script_debugger->profiling_set_frame_times(USEC_TO_SEC(frame_time), USEC_TO_SEC(idle_process_ticks), USEC_TO_SEC(physics_process_ticks), frame_slice);
}
script_debugger->idle_poll();
}
@@ -1700,9 +1700,9 @@ bool Main::iteration() {
Engine::get_singleton()->_fps = frames;
performance->set_process_time(USEC_TO_SEC(idle_process_max));
- performance->set_fixed_process_time(USEC_TO_SEC(fixed_process_max));
+ performance->set_physics_process_time(USEC_TO_SEC(physics_process_max));
idle_process_max = 0;
- fixed_process_max = 0;
+ physics_process_max = 0;
frame %= 1000000;
frames = 0;
diff --git a/main/performance.cpp b/main/performance.cpp
index 4dac6c119e..0f3383c4a8 100644
--- a/main/performance.cpp
+++ b/main/performance.cpp
@@ -42,7 +42,7 @@ void Performance::_bind_methods() {
BIND_ENUM_CONSTANT(TIME_FPS);
BIND_ENUM_CONSTANT(TIME_PROCESS);
- BIND_ENUM_CONSTANT(TIME_FIXED_PROCESS);
+ BIND_ENUM_CONSTANT(TIME_PHYSICS_PROCESS);
BIND_ENUM_CONSTANT(MEMORY_STATIC);
BIND_ENUM_CONSTANT(MEMORY_DYNAMIC);
BIND_ENUM_CONSTANT(MEMORY_STATIC_MAX);
@@ -78,7 +78,7 @@ String Performance::get_monitor_name(Monitor p_monitor) const {
"time/fps",
"time/process",
- "time/fixed_process",
+ "time/physics_process",
"memory/static",
"memory/dynamic",
"memory/static_max",
@@ -114,7 +114,7 @@ float Performance::get_monitor(Monitor p_monitor) const {
switch (p_monitor) {
case TIME_FPS: return Engine::get_singleton()->get_frames_per_second();
case TIME_PROCESS: return _process_time;
- case TIME_FIXED_PROCESS: return _fixed_process_time;
+ case TIME_PHYSICS_PROCESS: return _physics_process_time;
case MEMORY_STATIC: return Memory::get_mem_usage();
case MEMORY_DYNAMIC: return MemoryPool::total_memory;
case MEMORY_STATIC_MAX: return Memory::get_mem_max_usage();
@@ -158,14 +158,14 @@ void Performance::set_process_time(float p_pt) {
_process_time = p_pt;
}
-void Performance::set_fixed_process_time(float p_pt) {
+void Performance::set_physics_process_time(float p_pt) {
- _fixed_process_time = p_pt;
+ _physics_process_time = p_pt;
}
Performance::Performance() {
_process_time = 0;
- _fixed_process_time = 0;
+ _physics_process_time = 0;
singleton = this;
}
diff --git a/main/performance.h b/main/performance.h
index a9e3c07d7c..900e6434b7 100644
--- a/main/performance.h
+++ b/main/performance.h
@@ -43,14 +43,14 @@ class Performance : public Object {
static void _bind_methods();
float _process_time;
- float _fixed_process_time;
+ float _physics_process_time;
public:
enum Monitor {
TIME_FPS,
TIME_PROCESS,
- TIME_FIXED_PROCESS,
+ TIME_PHYSICS_PROCESS,
MEMORY_STATIC,
MEMORY_DYNAMIC,
MEMORY_STATIC_MAX,
@@ -83,7 +83,7 @@ public:
String get_monitor_name(Monitor p_monitor) const;
void set_process_time(float p_pt);
- void set_fixed_process_time(float p_pt);
+ void set_physics_process_time(float p_pt);
static Performance *get_singleton() { return singleton; }
diff --git a/modules/visual_script/visual_script.cpp b/modules/visual_script/visual_script.cpp
index c665fa12cf..2a556b5a52 100644
--- a/modules/visual_script/visual_script.cpp
+++ b/modules/visual_script/visual_script.cpp
@@ -2008,8 +2008,8 @@ void VisualScriptInstance::create(const Ref<VisualScript> &p_script, Object *p_o
Node *node = Object::cast_to<Node>(p_owner);
if (p_script->functions.has("_process"))
node->set_process(true);
- if (p_script->functions.has("_fixed_process"))
- node->set_fixed_process(true);
+ if (p_script->functions.has("_physics_process"))
+ node->set_physics_process(true);
if (p_script->functions.has("_input"))
node->set_process_input(true);
if (p_script->functions.has("_unhandled_input"))
diff --git a/modules/visual_script/visual_script_yield_nodes.cpp b/modules/visual_script/visual_script_yield_nodes.cpp
index b6d4021ca3..bc033418ba 100644
--- a/modules/visual_script/visual_script_yield_nodes.cpp
+++ b/modules/visual_script/visual_script_yield_nodes.cpp
@@ -82,7 +82,7 @@ String VisualScriptYield::get_text() const {
switch (yield_mode) {
case YIELD_RETURN: return ""; break;
case YIELD_FRAME: return "Next Frame"; break;
- case YIELD_FIXED_FRAME: return "Next Fixed Frame"; break;
+ case YIELD_PHYSICS_FRAME: return "Next Fixed Frame"; break;
case YIELD_WAIT: return rtos(wait_time) + " sec(s)"; break;
}
@@ -122,7 +122,7 @@ public:
ret = STEP_EXIT_FUNCTION_BIT;
break; //return the yield
case VisualScriptYield::YIELD_FRAME: state->connect_to_signal(tree, "idle_frame", Array()); break;
- case VisualScriptYield::YIELD_FIXED_FRAME: state->connect_to_signal(tree, "fixed_frame", Array()); break;
+ case VisualScriptYield::YIELD_PHYSICS_FRAME: state->connect_to_signal(tree, "physics_frame", Array()); break;
case VisualScriptYield::YIELD_WAIT: state->connect_to_signal(tree->create_timer(wait_time).ptr(), "timeout", Array()); break;
}
@@ -190,7 +190,7 @@ void VisualScriptYield::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::REAL, "wait_time"), "set_wait_time", "get_wait_time");
BIND_ENUM_CONSTANT(YIELD_FRAME);
- BIND_ENUM_CONSTANT(YIELD_FIXED_FRAME);
+ BIND_ENUM_CONSTANT(YIELD_PHYSICS_FRAME);
BIND_ENUM_CONSTANT(YIELD_WAIT);
}
@@ -597,7 +597,7 @@ static Ref<VisualScriptNode> create_yield_signal_node(const String &p_name) {
void register_visual_script_yield_nodes() {
VisualScriptLanguage::singleton->add_register_func("functions/wait/wait_frame", create_yield_node<VisualScriptYield::YIELD_FRAME>);
- VisualScriptLanguage::singleton->add_register_func("functions/wait/wait_fixed_frame", create_yield_node<VisualScriptYield::YIELD_FIXED_FRAME>);
+ VisualScriptLanguage::singleton->add_register_func("functions/wait/wait_physics_frame", create_yield_node<VisualScriptYield::YIELD_PHYSICS_FRAME>);
VisualScriptLanguage::singleton->add_register_func("functions/wait/wait_time", create_yield_node<VisualScriptYield::YIELD_WAIT>);
VisualScriptLanguage::singleton->add_register_func("functions/yield", create_yield_node<VisualScriptYield::YIELD_RETURN>);
diff --git a/modules/visual_script/visual_script_yield_nodes.h b/modules/visual_script/visual_script_yield_nodes.h
index d074962471..4a595a875a 100644
--- a/modules/visual_script/visual_script_yield_nodes.h
+++ b/modules/visual_script/visual_script_yield_nodes.h
@@ -39,7 +39,7 @@ public:
enum YieldMode {
YIELD_RETURN,
YIELD_FRAME,
- YIELD_FIXED_FRAME,
+ YIELD_PHYSICS_FRAME,
YIELD_WAIT
};
diff --git a/scene/2d/audio_stream_player_2d.cpp b/scene/2d/audio_stream_player_2d.cpp
index c40aeb764e..73e633139b 100644
--- a/scene/2d/audio_stream_player_2d.cpp
+++ b/scene/2d/audio_stream_player_2d.cpp
@@ -113,7 +113,7 @@ void AudioStreamPlayer2D::_notification(int p_what) {
AudioServer::get_singleton()->remove_callback(_mix_audios, this);
}
- if (p_what == NOTIFICATION_INTERNAL_FIXED_PROCESS) {
+ if (p_what == NOTIFICATION_INTERNAL_PHYSICS_PROCESS) {
//update anything related to position first, if possible of course
@@ -203,7 +203,7 @@ void AudioStreamPlayer2D::_notification(int p_what) {
//stop playing if no longer active
if (!active) {
- set_fixed_process_internal(false);
+ set_physics_process_internal(false);
//do not update, this makes it easier to animate (will shut off otherise)
//_change_notify("playing"); //update property in editor
emit_signal("finished");
@@ -255,7 +255,7 @@ void AudioStreamPlayer2D::play(float p_from_pos) {
if (stream_playback.is_valid()) {
setplay = p_from_pos;
output_ready = false;
- set_fixed_process_internal(true);
+ set_physics_process_internal(true);
}
}
@@ -270,7 +270,7 @@ void AudioStreamPlayer2D::stop() {
if (stream_playback.is_valid()) {
active = false;
- set_fixed_process_internal(false);
+ set_physics_process_internal(false);
setplay = -1;
}
}
diff --git a/scene/2d/camera_2d.cpp b/scene/2d/camera_2d.cpp
index 0d04967f1c..4fcd6893b8 100644
--- a/scene/2d/camera_2d.cpp
+++ b/scene/2d/camera_2d.cpp
@@ -138,7 +138,7 @@ Transform2D Camera2D::get_camera_transform() {
if (smoothing_enabled && !Engine::get_singleton()->is_editor_hint()) {
- float c = smoothing * get_fixed_process_delta_time();
+ float c = smoothing * get_physics_process_delta_time();
smoothed_camera_pos = ((camera_pos - smoothed_camera_pos) * c) + smoothed_camera_pos;
ret_camera_pos = smoothed_camera_pos;
//camera_pos=camera_pos*(1.0-smoothing)+new_camera_pos*smoothing;
@@ -212,14 +212,14 @@ void Camera2D::_notification(int p_what) {
switch (p_what) {
- case NOTIFICATION_FIXED_PROCESS: {
+ case NOTIFICATION_PHYSICS_PROCESS: {
_update_scroll();
} break;
case NOTIFICATION_TRANSFORM_CHANGED: {
- if (!is_fixed_processing())
+ if (!is_physics_processing())
_update_scroll();
} break;
@@ -241,7 +241,7 @@ void Camera2D::_notification(int p_what) {
add_to_group(canvas_group_name);
if (Engine::get_singleton()->is_editor_hint()) {
- set_fixed_process(false);
+ set_physics_process(false);
}
_update_scroll();
@@ -498,9 +498,9 @@ void Camera2D::set_follow_smoothing(float p_speed) {
smoothing = p_speed;
if (smoothing > 0 && !(is_inside_tree() && Engine::get_singleton()->is_editor_hint()))
- set_fixed_process(true);
+ set_physics_process(true);
else
- set_fixed_process(false);
+ set_physics_process(false);
}
float Camera2D::get_follow_smoothing() const {
diff --git a/scene/2d/physics_body_2d.cpp b/scene/2d/physics_body_2d.cpp
index c6cd3677cd..d3b37ae903 100644
--- a/scene/2d/physics_body_2d.cpp
+++ b/scene/2d/physics_body_2d.cpp
@@ -999,7 +999,7 @@ bool KinematicBody2D::move_and_collide(const Vector2 &p_motion, Collision &r_col
Vector2 KinematicBody2D::move_and_slide(const Vector2 &p_linear_velocity, const Vector2 &p_floor_direction, float p_slope_stop_min_velocity, int p_max_slides, float p_floor_max_angle) {
- Vector2 motion = (floor_velocity + p_linear_velocity) * get_fixed_process_delta_time();
+ Vector2 motion = (floor_velocity + p_linear_velocity) * get_physics_process_delta_time();
Vector2 lv = p_linear_velocity;
on_floor = false;
diff --git a/scene/2d/ray_cast_2d.cpp b/scene/2d/ray_cast_2d.cpp
index f90331c411..b272da46f8 100644
--- a/scene/2d/ray_cast_2d.cpp
+++ b/scene/2d/ray_cast_2d.cpp
@@ -95,7 +95,7 @@ void RayCast2D::set_enabled(bool p_enabled) {
enabled = p_enabled;
if (is_inside_tree() && !Engine::get_singleton()->is_editor_hint())
- set_fixed_process(p_enabled);
+ set_physics_process(p_enabled);
if (!p_enabled)
collided = false;
}
@@ -135,9 +135,9 @@ void RayCast2D::_notification(int p_what) {
case NOTIFICATION_ENTER_TREE: {
if (enabled && !Engine::get_singleton()->is_editor_hint())
- set_fixed_process(true);
+ set_physics_process(true);
else
- set_fixed_process(false);
+ set_physics_process(false);
if (Object::cast_to<PhysicsBody2D>(get_parent())) {
if (exclude_parent_body)
@@ -149,7 +149,7 @@ void RayCast2D::_notification(int p_what) {
case NOTIFICATION_EXIT_TREE: {
if (enabled)
- set_fixed_process(false);
+ set_physics_process(false);
} break;
@@ -177,7 +177,7 @@ void RayCast2D::_notification(int p_what) {
} break;
- case NOTIFICATION_FIXED_PROCESS: {
+ case NOTIFICATION_PHYSICS_PROCESS: {
if (!enabled)
break;
diff --git a/scene/2d/visibility_notifier_2d.cpp b/scene/2d/visibility_notifier_2d.cpp
index 8fc8b65217..ca7b6aa0e4 100644
--- a/scene/2d/visibility_notifier_2d.cpp
+++ b/scene/2d/visibility_notifier_2d.cpp
@@ -154,8 +154,8 @@ void VisibilityEnabler2D::_screen_enter() {
_change_node_state(E->key(), true);
}
- if (enabler[ENABLER_PARENT_FIXED_PROCESS] && get_parent())
- get_parent()->set_fixed_process(true);
+ if (enabler[ENABLER_PARENT_PHYSICS_PROCESS] && get_parent())
+ get_parent()->set_physics_process(true);
if (enabler[ENABLER_PARENT_PROCESS] && get_parent())
get_parent()->set_process(true);
@@ -169,8 +169,8 @@ void VisibilityEnabler2D::_screen_exit() {
_change_node_state(E->key(), false);
}
- if (enabler[ENABLER_PARENT_FIXED_PROCESS] && get_parent())
- get_parent()->set_fixed_process(false);
+ if (enabler[ENABLER_PARENT_PHYSICS_PROCESS] && get_parent())
+ get_parent()->set_physics_process(false);
if (enabler[ENABLER_PARENT_PROCESS] && get_parent())
get_parent()->set_process(false);
@@ -246,8 +246,8 @@ void VisibilityEnabler2D::_notification(int p_what) {
_find_nodes(from);
- if (enabler[ENABLER_PARENT_FIXED_PROCESS] && get_parent())
- get_parent()->set_fixed_process(false);
+ if (enabler[ENABLER_PARENT_PHYSICS_PROCESS] && get_parent())
+ get_parent()->set_physics_process(false);
if (enabler[ENABLER_PARENT_PROCESS] && get_parent())
get_parent()->set_process(false);
}
@@ -339,14 +339,14 @@ void VisibilityEnabler2D::_bind_methods() {
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "pause_particles"), "set_enabler", "is_enabler_enabled", ENABLER_PAUSE_PARTICLES);
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "pause_animated_sprites"), "set_enabler", "is_enabler_enabled", ENABLER_PAUSE_ANIMATED_SPRITES);
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "process_parent"), "set_enabler", "is_enabler_enabled", ENABLER_PARENT_PROCESS);
- ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "fixed_process_parent"), "set_enabler", "is_enabler_enabled", ENABLER_PARENT_FIXED_PROCESS);
+ ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "physics_process_parent"), "set_enabler", "is_enabler_enabled", ENABLER_PARENT_PHYSICS_PROCESS);
BIND_ENUM_CONSTANT(ENABLER_FREEZE_BODIES);
BIND_ENUM_CONSTANT(ENABLER_PAUSE_ANIMATIONS);
BIND_ENUM_CONSTANT(ENABLER_PAUSE_PARTICLES);
BIND_ENUM_CONSTANT(ENABLER_PAUSE_ANIMATED_SPRITES);
BIND_ENUM_CONSTANT(ENABLER_PARENT_PROCESS);
- BIND_ENUM_CONSTANT(ENABLER_PARENT_FIXED_PROCESS);
+ BIND_ENUM_CONSTANT(ENABLER_PARENT_PHYSICS_PROCESS);
BIND_ENUM_CONSTANT(ENABLER_MAX);
}
@@ -366,7 +366,7 @@ VisibilityEnabler2D::VisibilityEnabler2D() {
for (int i = 0; i < ENABLER_MAX; i++)
enabler[i] = true;
enabler[ENABLER_PARENT_PROCESS] = false;
- enabler[ENABLER_PARENT_FIXED_PROCESS] = false;
+ enabler[ENABLER_PARENT_PHYSICS_PROCESS] = false;
visible = false;
}
diff --git a/scene/2d/visibility_notifier_2d.h b/scene/2d/visibility_notifier_2d.h
index ef0e1affd3..ee5152978b 100644
--- a/scene/2d/visibility_notifier_2d.h
+++ b/scene/2d/visibility_notifier_2d.h
@@ -74,7 +74,7 @@ public:
ENABLER_FREEZE_BODIES,
ENABLER_PAUSE_PARTICLES,
ENABLER_PARENT_PROCESS,
- ENABLER_PARENT_FIXED_PROCESS,
+ ENABLER_PARENT_PHYSICS_PROCESS,
ENABLER_PAUSE_ANIMATED_SPRITES,
ENABLER_MAX
};
diff --git a/scene/3d/audio_stream_player_3d.cpp b/scene/3d/audio_stream_player_3d.cpp
index 7bc8c9e89e..3c92814c87 100644
--- a/scene/3d/audio_stream_player_3d.cpp
+++ b/scene/3d/audio_stream_player_3d.cpp
@@ -214,7 +214,7 @@ void AudioStreamPlayer3D::_notification(int p_what) {
}
}
- if (p_what == NOTIFICATION_INTERNAL_FIXED_PROCESS) {
+ if (p_what == NOTIFICATION_INTERNAL_PHYSICS_PROCESS) {
//update anything related to position first, if possible of course
@@ -512,7 +512,7 @@ void AudioStreamPlayer3D::_notification(int p_what) {
//stop playing if no longer active
if (!active) {
- set_fixed_process_internal(false);
+ set_physics_process_internal(false);
//do not update, this makes it easier to animate (will shut off otherise)
//_change_notify("playing"); //update property in editor
emit_signal("finished");
@@ -582,7 +582,7 @@ void AudioStreamPlayer3D::play(float p_from_pos) {
if (stream_playback.is_valid()) {
setplay = p_from_pos;
output_ready = false;
- set_fixed_process_internal(true);
+ set_physics_process_internal(true);
}
}
@@ -597,7 +597,7 @@ void AudioStreamPlayer3D::stop() {
if (stream_playback.is_valid()) {
active = false;
- set_fixed_process_internal(false);
+ set_physics_process_internal(false);
setplay = -1;
}
}
@@ -776,7 +776,7 @@ void AudioStreamPlayer3D::set_doppler_tracking(DopplerTracking p_tracking) {
if (doppler_tracking != DOPPLER_TRACKING_DISABLED) {
set_notify_transform(true);
- velocity_tracker->set_track_fixed_step(doppler_tracking == DOPPLER_TRACKING_FIXED_STEP);
+ velocity_tracker->set_track_physics_step(doppler_tracking == DOPPLER_TRACKING_PHYSICS_STEP);
velocity_tracker->reset(get_global_transform().origin);
} else {
set_notify_transform(false);
@@ -880,7 +880,7 @@ void AudioStreamPlayer3D::_bind_methods() {
BIND_ENUM_CONSTANT(DOPPLER_TRACKING_DISABLED);
BIND_ENUM_CONSTANT(DOPPLER_TRACKING_IDLE_STEP);
- BIND_ENUM_CONSTANT(DOPPLER_TRACKING_FIXED_STEP);
+ BIND_ENUM_CONSTANT(DOPPLER_TRACKING_PHYSICS_STEP);
ADD_SIGNAL(MethodInfo("finished"));
}
diff --git a/scene/3d/audio_stream_player_3d.h b/scene/3d/audio_stream_player_3d.h
index 2c2d4610c8..5982d7a3ac 100644
--- a/scene/3d/audio_stream_player_3d.h
+++ b/scene/3d/audio_stream_player_3d.h
@@ -26,7 +26,7 @@ public:
enum DopplerTracking {
DOPPLER_TRACKING_DISABLED,
DOPPLER_TRACKING_IDLE_STEP,
- DOPPLER_TRACKING_FIXED_STEP
+ DOPPLER_TRACKING_PHYSICS_STEP
};
private:
diff --git a/scene/3d/camera.cpp b/scene/3d/camera.cpp
index 02a7845e0b..7baf9a9deb 100644
--- a/scene/3d/camera.cpp
+++ b/scene/3d/camera.cpp
@@ -507,7 +507,7 @@ void Camera::set_doppler_tracking(DopplerTracking p_tracking) {
doppler_tracking = p_tracking;
if (p_tracking != DOPPLER_TRACKING_DISABLED) {
- velocity_tracker->set_track_fixed_step(doppler_tracking == DOPPLER_TRACKING_FIXED_STEP);
+ velocity_tracker->set_track_physics_step(doppler_tracking == DOPPLER_TRACKING_PHYSICS_STEP);
velocity_tracker->reset(get_global_transform().origin);
}
}
@@ -557,7 +557,7 @@ void Camera::_bind_methods() {
BIND_ENUM_CONSTANT(DOPPLER_TRACKING_DISABLED)
BIND_ENUM_CONSTANT(DOPPLER_TRACKING_IDLE_STEP)
- BIND_ENUM_CONSTANT(DOPPLER_TRACKING_FIXED_STEP)
+ BIND_ENUM_CONSTANT(DOPPLER_TRACKING_PHYSICS_STEP)
}
float Camera::get_fov() const {
diff --git a/scene/3d/camera.h b/scene/3d/camera.h
index 243a7b9b39..3a725eaf66 100644
--- a/scene/3d/camera.h
+++ b/scene/3d/camera.h
@@ -56,7 +56,7 @@ public:
enum DopplerTracking {
DOPPLER_TRACKING_DISABLED,
DOPPLER_TRACKING_IDLE_STEP,
- DOPPLER_TRACKING_FIXED_STEP
+ DOPPLER_TRACKING_PHYSICS_STEP
};
private:
diff --git a/scene/3d/interpolated_camera.cpp b/scene/3d/interpolated_camera.cpp
index 0f281b694d..3ff8317732 100644
--- a/scene/3d/interpolated_camera.cpp
+++ b/scene/3d/interpolated_camera.cpp
@@ -37,7 +37,7 @@ void InterpolatedCamera::_notification(int p_what) {
case NOTIFICATION_ENTER_TREE: {
if (Engine::get_singleton()->is_editor_hint() && enabled)
- set_fixed_process(false);
+ set_physics_process(false);
} break;
case NOTIFICATION_PROCESS: {
diff --git a/scene/3d/physics_body.cpp b/scene/3d/physics_body.cpp
index 005ea1f8d1..d7fdf94d40 100644
--- a/scene/3d/physics_body.cpp
+++ b/scene/3d/physics_body.cpp
@@ -960,7 +960,7 @@ bool KinematicBody::move_and_collide(const Vector3 &p_motion, Collision &r_colli
Vector3 KinematicBody::move_and_slide(const Vector3 &p_linear_velocity, const Vector3 &p_floor_direction, float p_slope_stop_min_velocity, int p_max_slides, float p_floor_max_angle) {
- Vector3 motion = (floor_velocity + p_linear_velocity) * get_fixed_process_delta_time();
+ Vector3 motion = (floor_velocity + p_linear_velocity) * get_physics_process_delta_time();
Vector3 lv = p_linear_velocity;
on_floor = false;
diff --git a/scene/3d/ray_cast.cpp b/scene/3d/ray_cast.cpp
index 72b7706b77..df6764ee1a 100644
--- a/scene/3d/ray_cast.cpp
+++ b/scene/3d/ray_cast.cpp
@@ -97,7 +97,7 @@ void RayCast::set_enabled(bool p_enabled) {
enabled = p_enabled;
if (is_inside_tree() && !Engine::get_singleton()->is_editor_hint())
- set_fixed_process(p_enabled);
+ set_physics_process(p_enabled);
if (!p_enabled)
collided = false;
@@ -121,25 +121,25 @@ void RayCast::_notification(int p_what) {
case NOTIFICATION_ENTER_TREE: {
if (enabled && !Engine::get_singleton()->is_editor_hint()) {
- set_fixed_process(true);
+ set_physics_process(true);
if (get_tree()->is_debugging_collisions_hint())
_update_debug_shape();
} else
- set_fixed_process(false);
+ set_physics_process(false);
} break;
case NOTIFICATION_EXIT_TREE: {
if (enabled) {
- set_fixed_process(false);
+ set_physics_process(false);
}
if (debug_shape)
_clear_debug_shape();
} break;
- case NOTIFICATION_FIXED_PROCESS: {
+ case NOTIFICATION_PHYSICS_PROCESS: {
if (!enabled)
break;
diff --git a/scene/3d/spatial_velocity_tracker.cpp b/scene/3d/spatial_velocity_tracker.cpp
index dc822d0446..1c7423e645 100644
--- a/scene/3d/spatial_velocity_tracker.cpp
+++ b/scene/3d/spatial_velocity_tracker.cpp
@@ -1,21 +1,21 @@
#include "spatial_velocity_tracker.h"
#include "engine.h"
-void SpatialVelocityTracker::set_track_fixed_step(bool p_track_fixed_step) {
+void SpatialVelocityTracker::set_track_physics_step(bool p_track_physics_step) {
- fixed_step = p_track_fixed_step;
+ physics_step = p_track_physics_step;
}
-bool SpatialVelocityTracker::is_tracking_fixed_step() const {
+bool SpatialVelocityTracker::is_tracking_physics_step() const {
- return fixed_step;
+ return physics_step;
}
void SpatialVelocityTracker::update_position(const Vector3 &p_position) {
PositionHistory ph;
ph.position = p_position;
- if (fixed_step) {
- ph.frame = Engine::get_singleton()->get_fixed_frames();
+ if (physics_step) {
+ ph.frame = Engine::get_singleton()->get_physics_frames();
} else {
ph.frame = Engine::get_singleton()->get_idle_frame_ticks();
}
@@ -40,8 +40,8 @@ Vector3 SpatialVelocityTracker::get_tracked_linear_velocity() const {
float base_time = 0.0;
if (position_history_len) {
- if (fixed_step) {
- uint64_t base = Engine::get_singleton()->get_fixed_frames();
+ if (physics_step) {
+ uint64_t base = Engine::get_singleton()->get_physics_frames();
base_time = float(base - position_history[0].frame) / Engine::get_singleton()->get_iterations_per_second();
} else {
uint64_t base = Engine::get_singleton()->get_idle_frame_ticks();
@@ -54,7 +54,7 @@ Vector3 SpatialVelocityTracker::get_tracked_linear_velocity() const {
uint64_t diff = position_history[i].frame - position_history[i + 1].frame;
Vector3 distance = position_history[i].position - position_history[i + 1].position;
- if (fixed_step) {
+ if (physics_step) {
delta = float(diff) / Engine::get_singleton()->get_iterations_per_second();
} else {
delta = double(diff) / 1000000.0;
@@ -78,8 +78,8 @@ void SpatialVelocityTracker::reset(const Vector3 &p_new_pos) {
PositionHistory ph;
ph.position = p_new_pos;
- if (fixed_step) {
- ph.frame = Engine::get_singleton()->get_fixed_frames();
+ if (physics_step) {
+ ph.frame = Engine::get_singleton()->get_physics_frames();
} else {
ph.frame = Engine::get_singleton()->get_idle_frame_ticks();
}
@@ -90,8 +90,8 @@ void SpatialVelocityTracker::reset(const Vector3 &p_new_pos) {
void SpatialVelocityTracker::_bind_methods() {
- ClassDB::bind_method(D_METHOD("set_track_fixed_step", "enable"), &SpatialVelocityTracker::set_track_fixed_step);
- ClassDB::bind_method(D_METHOD("is_tracking_fixed_step"), &SpatialVelocityTracker::is_tracking_fixed_step);
+ ClassDB::bind_method(D_METHOD("set_track_physics_step", "enable"), &SpatialVelocityTracker::set_track_physics_step);
+ ClassDB::bind_method(D_METHOD("is_tracking_physics_step"), &SpatialVelocityTracker::is_tracking_physics_step);
ClassDB::bind_method(D_METHOD("update_position", "position"), &SpatialVelocityTracker::update_position);
ClassDB::bind_method(D_METHOD("get_tracked_linear_velocity"), &SpatialVelocityTracker::get_tracked_linear_velocity);
ClassDB::bind_method(D_METHOD("reset", "position"), &SpatialVelocityTracker::reset);
@@ -100,5 +100,5 @@ void SpatialVelocityTracker::_bind_methods() {
SpatialVelocityTracker::SpatialVelocityTracker() {
position_history.resize(4); // should be configurable
position_history_len = 0;
- fixed_step = false;
+ physics_step = false;
}
diff --git a/scene/3d/spatial_velocity_tracker.h b/scene/3d/spatial_velocity_tracker.h
index b8237613a7..c4371ff1f7 100644
--- a/scene/3d/spatial_velocity_tracker.h
+++ b/scene/3d/spatial_velocity_tracker.h
@@ -11,7 +11,7 @@ class SpatialVelocityTracker : public Reference {
Vector3 position;
};
- bool fixed_step;
+ bool physics_step;
Vector<PositionHistory> position_history;
int position_history_len;
@@ -20,8 +20,8 @@ protected:
public:
void reset(const Vector3 &p_new_pos);
- void set_track_fixed_step(bool p_track_fixed_step);
- bool is_tracking_fixed_step() const;
+ void set_track_physics_step(bool p_track_physics_step);
+ bool is_tracking_physics_step() const;
void update_position(const Vector3 &p_position);
Vector3 get_tracked_linear_velocity() const;
diff --git a/scene/animation/animation_player.cpp b/scene/animation/animation_player.cpp
index cadbd086bc..a38bee1b43 100644
--- a/scene/animation/animation_player.cpp
+++ b/scene/animation/animation_player.cpp
@@ -192,7 +192,7 @@ void AnimationPlayer::_notification(int p_what) {
if (!processing) {
//make sure that a previous process state was not saved
//only process if "processing" is set
- set_fixed_process(false);
+ set_physics_process(false);
set_process(false);
}
//_set_process(false);
@@ -207,19 +207,19 @@ void AnimationPlayer::_notification(int p_what) {
}
} break;
case NOTIFICATION_INTERNAL_PROCESS: {
- if (animation_process_mode == ANIMATION_PROCESS_FIXED)
+ if (animation_process_mode == ANIMATION_PROCESS_PHYSICS)
break;
if (processing)
_animation_process(get_process_delta_time());
} break;
- case NOTIFICATION_INTERNAL_FIXED_PROCESS: {
+ case NOTIFICATION_INTERNAL_PHYSICS_PROCESS: {
if (animation_process_mode == ANIMATION_PROCESS_IDLE)
break;
if (processing)
- _animation_process(get_fixed_process_delta_time());
+ _animation_process(get_physics_process_delta_time());
} break;
case NOTIFICATION_EXIT_TREE: {
@@ -1140,7 +1140,7 @@ void AnimationPlayer::_set_process(bool p_process, bool p_force) {
switch (animation_process_mode) {
- case ANIMATION_PROCESS_FIXED: set_fixed_process_internal(p_process && active); break;
+ case ANIMATION_PROCESS_PHYSICS: set_physics_process_internal(p_process && active); break;
case ANIMATION_PROCESS_IDLE: set_process_internal(p_process && active); break;
}
@@ -1262,7 +1262,7 @@ void AnimationPlayer::_bind_methods() {
ADD_SIGNAL(MethodInfo("animation_changed", PropertyInfo(Variant::STRING, "old_name"), PropertyInfo(Variant::STRING, "new_name")));
ADD_SIGNAL(MethodInfo("animation_started", PropertyInfo(Variant::STRING, "name")));
- BIND_ENUM_CONSTANT(ANIMATION_PROCESS_FIXED);
+ BIND_ENUM_CONSTANT(ANIMATION_PROCESS_PHYSICS);
BIND_ENUM_CONSTANT(ANIMATION_PROCESS_IDLE);
}
diff --git a/scene/animation/animation_player.h b/scene/animation/animation_player.h
index bface7aabb..83da3b2e5c 100644
--- a/scene/animation/animation_player.h
+++ b/scene/animation/animation_player.h
@@ -44,7 +44,7 @@ class AnimationPlayer : public Node {
public:
enum AnimationProcessMode {
- ANIMATION_PROCESS_FIXED,
+ ANIMATION_PROCESS_PHYSICS,
ANIMATION_PROCESS_IDLE,
};
diff --git a/scene/animation/animation_tree_player.cpp b/scene/animation/animation_tree_player.cpp
index a2a8adb653..d564671bcf 100644
--- a/scene/animation/animation_tree_player.cpp
+++ b/scene/animation/animation_tree_player.cpp
@@ -56,7 +56,7 @@ void AnimationTreePlayer::_set_process(bool p_process, bool p_force) {
switch (animation_process_mode) {
- case ANIMATION_PROCESS_FIXED: set_fixed_process_internal(p_process && active); break;
+ case ANIMATION_PROCESS_PHYSICS: set_physics_process_internal(p_process && active); break;
case ANIMATION_PROCESS_IDLE: set_process_internal(p_process && active); break;
}
@@ -405,7 +405,7 @@ void AnimationTreePlayer::_notification(int p_what) {
if (!processing) {
//make sure that a previous process state was not saved
//only process if "processing" is set
- set_fixed_process_internal(false);
+ set_physics_process_internal(false);
set_process_internal(false);
}
} break;
@@ -416,19 +416,19 @@ void AnimationTreePlayer::_notification(int p_what) {
}
} break;
case NOTIFICATION_INTERNAL_PROCESS: {
- if (animation_process_mode == ANIMATION_PROCESS_FIXED)
+ if (animation_process_mode == ANIMATION_PROCESS_PHYSICS)
break;
if (processing)
_process_animation(get_process_delta_time());
} break;
- case NOTIFICATION_INTERNAL_FIXED_PROCESS: {
+ case NOTIFICATION_INTERNAL_PHYSICS_PROCESS: {
if (animation_process_mode == ANIMATION_PROCESS_IDLE)
break;
if (processing)
- _process_animation(get_fixed_process_delta_time());
+ _process_animation(get_physics_process_delta_time());
} break;
}
}
@@ -1809,7 +1809,7 @@ void AnimationTreePlayer::_bind_methods() {
BIND_ENUM_CONSTANT(NODE_TIMESEEK);
BIND_ENUM_CONSTANT(NODE_TRANSITION);
- BIND_ENUM_CONSTANT(ANIMATION_PROCESS_FIXED);
+ BIND_ENUM_CONSTANT(ANIMATION_PROCESS_PHYSICS);
BIND_ENUM_CONSTANT(ANIMATION_PROCESS_IDLE);
}
diff --git a/scene/animation/animation_tree_player.h b/scene/animation/animation_tree_player.h
index 806a4f6604..3e2bb88198 100644
--- a/scene/animation/animation_tree_player.h
+++ b/scene/animation/animation_tree_player.h
@@ -42,7 +42,7 @@ class AnimationTreePlayer : public Node {
public:
enum AnimationProcessMode {
- ANIMATION_PROCESS_FIXED,
+ ANIMATION_PROCESS_PHYSICS,
ANIMATION_PROCESS_IDLE,
};
diff --git a/scene/animation/tween.cpp b/scene/animation/tween.cpp
index fb61c43d5c..fb327191b9 100644
--- a/scene/animation/tween.cpp
+++ b/scene/animation/tween.cpp
@@ -152,7 +152,7 @@ void Tween::_notification(int p_what) {
if (!processing) {
//make sure that a previous process state was not saved
//only process if "processing" is set
- set_fixed_process_internal(false);
+ set_physics_process_internal(false);
set_process_internal(false);
}
} break;
@@ -160,19 +160,19 @@ void Tween::_notification(int p_what) {
} break;
case NOTIFICATION_INTERNAL_PROCESS: {
- if (tween_process_mode == TWEEN_PROCESS_FIXED)
+ if (tween_process_mode == TWEEN_PROCESS_PHYSICS)
break;
if (processing)
_tween_process(get_process_delta_time());
} break;
- case NOTIFICATION_INTERNAL_FIXED_PROCESS: {
+ case NOTIFICATION_INTERNAL_PHYSICS_PROCESS: {
if (tween_process_mode == TWEEN_PROCESS_IDLE)
break;
if (processing)
- _tween_process(get_fixed_process_delta_time());
+ _tween_process(get_physics_process_delta_time());
} break;
case NOTIFICATION_EXIT_TREE: {
@@ -224,7 +224,7 @@ void Tween::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "playback_process_mode", PROPERTY_HINT_ENUM, "Fixed,Idle"), "set_tween_process_mode", "get_tween_process_mode");
- BIND_ENUM_CONSTANT(TWEEN_PROCESS_FIXED);
+ BIND_ENUM_CONSTANT(TWEEN_PROCESS_PHYSICS);
BIND_ENUM_CONSTANT(TWEEN_PROCESS_IDLE);
BIND_ENUM_CONSTANT(TRANS_LINEAR);
@@ -642,7 +642,7 @@ void Tween::_set_process(bool p_process, bool p_force) {
switch (tween_process_mode) {
- case TWEEN_PROCESS_FIXED: set_fixed_process_internal(p_process && active); break;
+ case TWEEN_PROCESS_PHYSICS: set_physics_process_internal(p_process && active); break;
case TWEEN_PROCESS_IDLE: set_process_internal(p_process && active); break;
}
diff --git a/scene/animation/tween.h b/scene/animation/tween.h
index 929d63a7fc..fac1d346b4 100644
--- a/scene/animation/tween.h
+++ b/scene/animation/tween.h
@@ -38,7 +38,7 @@ class Tween : public Node {
public:
enum TweenProcessMode {
- TWEEN_PROCESS_FIXED,
+ TWEEN_PROCESS_PHYSICS,
TWEEN_PROCESS_IDLE,
};
diff --git a/scene/gui/scroll_bar.cpp b/scene/gui/scroll_bar.cpp
index 6044b86ef5..c5ffec2d5e 100644
--- a/scene/gui/scroll_bar.cpp
+++ b/scene/gui/scroll_bar.cpp
@@ -113,7 +113,7 @@ void ScrollBar::_gui_input(Ref<InputEvent> p_event) {
if (smooth_scroll_enabled) {
scrolling = true;
- set_fixed_process(true);
+ set_physics_process(true);
} else {
set_value(target_scroll);
}
@@ -137,7 +137,7 @@ void ScrollBar::_gui_input(Ref<InputEvent> p_event) {
if (smooth_scroll_enabled) {
scrolling = true;
- set_fixed_process(true);
+ set_physics_process(true);
} else {
set_value(target_scroll);
}
@@ -335,13 +335,13 @@ void ScrollBar::_notification(int p_what) {
drag_slave = NULL;
}
- if (p_what == NOTIFICATION_FIXED_PROCESS) {
+ if (p_what == NOTIFICATION_PHYSICS_PROCESS) {
if (scrolling) {
if (get_value() != target_scroll) {
double target = target_scroll - get_value();
double dist = sqrt(target * target);
- double vel = ((target / dist) * 500) * get_fixed_process_delta_time();
+ double vel = ((target / dist) * 500) * get_physics_process_delta_time();
if (Math::abs(vel) >= dist) {
set_value(target_scroll);
@@ -350,14 +350,14 @@ void ScrollBar::_notification(int p_what) {
}
} else {
scrolling = false;
- set_fixed_process(false);
+ set_physics_process(false);
}
} else if (drag_slave_touching) {
if (drag_slave_touching_deaccel) {
Vector2 pos = Vector2(orientation == HORIZONTAL ? get_value() : 0, orientation == VERTICAL ? get_value() : 0);
- pos += drag_slave_speed * get_fixed_process_delta_time();
+ pos += drag_slave_speed * get_physics_process_delta_time();
bool turnoff = false;
@@ -377,7 +377,7 @@ void ScrollBar::_notification(int p_what) {
float sgn_x = drag_slave_speed.x < 0 ? -1 : 1;
float val_x = Math::abs(drag_slave_speed.x);
- val_x -= 1000 * get_fixed_process_delta_time();
+ val_x -= 1000 * get_physics_process_delta_time();
if (val_x < 0) {
turnoff = true;
@@ -401,7 +401,7 @@ void ScrollBar::_notification(int p_what) {
float sgn_y = drag_slave_speed.y < 0 ? -1 : 1;
float val_y = Math::abs(drag_slave_speed.y);
- val_y -= 1000 * get_fixed_process_delta_time();
+ val_y -= 1000 * get_physics_process_delta_time();
if (val_y < 0) {
turnoff = true;
@@ -410,7 +410,7 @@ void ScrollBar::_notification(int p_what) {
}
if (turnoff) {
- set_fixed_process(false);
+ set_physics_process(false);
drag_slave_touching = false;
drag_slave_touching_deaccel = false;
}
@@ -421,10 +421,10 @@ void ScrollBar::_notification(int p_what) {
Vector2 diff = drag_slave_accum - last_drag_slave_accum;
last_drag_slave_accum = drag_slave_accum;
- drag_slave_speed = diff / get_fixed_process_delta_time();
+ drag_slave_speed = diff / get_physics_process_delta_time();
}
- time_since_motion += get_fixed_process_delta_time();
+ time_since_motion += get_physics_process_delta_time();
}
}
}
@@ -579,7 +579,7 @@ void ScrollBar::_drag_slave_input(const Ref<InputEvent> &p_input) {
if (mb->is_pressed()) {
if (drag_slave_touching) {
- set_fixed_process(false);
+ set_physics_process(false);
drag_slave_touching_deaccel = false;
drag_slave_touching = false;
drag_slave_speed = Vector2();
@@ -599,7 +599,7 @@ void ScrollBar::_drag_slave_input(const Ref<InputEvent> &p_input) {
drag_slave_touching_deaccel = false;
time_since_motion = 0;
if (drag_slave_touching) {
- set_fixed_process(true);
+ set_physics_process(true);
time_since_motion = 0;
}
}
@@ -611,7 +611,7 @@ void ScrollBar::_drag_slave_input(const Ref<InputEvent> &p_input) {
if (drag_slave_speed == Vector2()) {
drag_slave_touching_deaccel = false;
drag_slave_touching = false;
- set_fixed_process(false);
+ set_physics_process(false);
} else {
drag_slave_touching_deaccel = true;
diff --git a/scene/gui/scroll_container.cpp b/scene/gui/scroll_container.cpp
index c71093b947..1ad1e3f638 100644
--- a/scene/gui/scroll_container.cpp
+++ b/scene/gui/scroll_container.cpp
@@ -67,7 +67,7 @@ Size2 ScrollContainer::get_minimum_size() const {
};
void ScrollContainer::_cancel_drag() {
- set_fixed_process(false);
+ set_physics_process(false);
drag_touching_deaccel = false;
drag_touching = false;
drag_speed = Vector2();
@@ -121,7 +121,7 @@ void ScrollContainer::_gui_input(const Ref<InputEvent> &p_gui_input) {
if (mb->is_pressed()) {
if (drag_touching) {
- set_fixed_process(false);
+ set_physics_process(false);
drag_touching_deaccel = false;
drag_touching = false;
drag_speed = Vector2();
@@ -139,7 +139,7 @@ void ScrollContainer::_gui_input(const Ref<InputEvent> &p_gui_input) {
drag_touching_deaccel = false;
time_since_motion = 0;
if (drag_touching) {
- set_fixed_process(true);
+ set_physics_process(true);
time_since_motion = 0;
}
}
@@ -150,7 +150,7 @@ void ScrollContainer::_gui_input(const Ref<InputEvent> &p_gui_input) {
if (drag_speed == Vector2()) {
drag_touching_deaccel = false;
drag_touching = false;
- set_fixed_process(false);
+ set_physics_process(false);
} else {
drag_touching_deaccel = true;
@@ -257,14 +257,14 @@ void ScrollContainer::_notification(int p_what) {
update_scrollbars();
}
- if (p_what == NOTIFICATION_FIXED_PROCESS) {
+ if (p_what == NOTIFICATION_PHYSICS_PROCESS) {
if (drag_touching) {
if (drag_touching_deaccel) {
Vector2 pos = Vector2(h_scroll->get_value(), v_scroll->get_value());
- pos += drag_speed * get_fixed_process_delta_time();
+ pos += drag_speed * get_physics_process_delta_time();
bool turnoff_h = false;
bool turnoff_v = false;
@@ -294,7 +294,7 @@ void ScrollContainer::_notification(int p_what) {
float sgn_x = drag_speed.x < 0 ? -1 : 1;
float val_x = Math::abs(drag_speed.x);
- val_x -= 1000 * get_fixed_process_delta_time();
+ val_x -= 1000 * get_physics_process_delta_time();
if (val_x < 0) {
turnoff_h = true;
@@ -302,7 +302,7 @@ void ScrollContainer::_notification(int p_what) {
float sgn_y = drag_speed.y < 0 ? -1 : 1;
float val_y = Math::abs(drag_speed.y);
- val_y -= 1000 * get_fixed_process_delta_time();
+ val_y -= 1000 * get_physics_process_delta_time();
if (val_y < 0) {
turnoff_v = true;
@@ -311,7 +311,7 @@ void ScrollContainer::_notification(int p_what) {
drag_speed = Vector2(sgn_x * val_x, sgn_y * val_y);
if (turnoff_h && turnoff_v) {
- set_fixed_process(false);
+ set_physics_process(false);
drag_touching = false;
drag_touching_deaccel = false;
}
@@ -322,10 +322,10 @@ void ScrollContainer::_notification(int p_what) {
Vector2 diff = drag_accum - last_drag_accum;
last_drag_accum = drag_accum;
- drag_speed = diff / get_fixed_process_delta_time();
+ drag_speed = diff / get_physics_process_delta_time();
}
- time_since_motion += get_fixed_process_delta_time();
+ time_since_motion += get_physics_process_delta_time();
}
}
}
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index 11bdbfc3e8..d14d3ef947 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -428,22 +428,22 @@ void TextEdit::_notification(int p_what) {
draw_caret = false;
update();
} break;
- case NOTIFICATION_FIXED_PROCESS: {
+ case NOTIFICATION_PHYSICS_PROCESS: {
if (scrolling && v_scroll->get_value() != target_v_scroll) {
double target_y = target_v_scroll - v_scroll->get_value();
double dist = sqrt(target_y * target_y);
- double vel = ((target_y / dist) * v_scroll_speed) * get_fixed_process_delta_time();
+ double vel = ((target_y / dist) * v_scroll_speed) * get_physics_process_delta_time();
if (Math::abs(vel) >= dist) {
v_scroll->set_value(target_v_scroll);
scrolling = false;
- set_fixed_process(false);
+ set_physics_process(false);
} else {
v_scroll->set_value(v_scroll->get_value() + vel);
}
} else {
scrolling = false;
- set_fixed_process(false);
+ set_physics_process(false);
}
} break;
case NOTIFICATION_DRAW: {
@@ -1610,7 +1610,7 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
target_v_scroll = 0;
}
scrolling = true;
- set_fixed_process(true);
+ set_physics_process(true);
} else {
v_scroll->set_value(target_v_scroll);
}
@@ -1632,7 +1632,7 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
target_v_scroll = max_v_scroll;
}
scrolling = true;
- set_fixed_process(true);
+ set_physics_process(true);
} else {
v_scroll->set_value(target_v_scroll);
}
diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp
index 613e5520a9..178a1c272b 100644
--- a/scene/gui/tree.cpp
+++ b/scene/gui/tree.cpp
@@ -2493,7 +2493,7 @@ void Tree::_gui_input(Ref<InputEvent> p_event) {
if (drag_speed == 0) {
drag_touching_deaccel = false;
drag_touching = false;
- set_fixed_process(false);
+ set_physics_process(false);
} else {
drag_touching_deaccel = true;
@@ -2559,7 +2559,7 @@ void Tree::_gui_input(Ref<InputEvent> p_event) {
break;
if (drag_touching) {
- set_fixed_process(false);
+ set_physics_process(false);
drag_touching_deaccel = false;
drag_touching = false;
drag_speed = 0;
@@ -2574,7 +2574,7 @@ void Tree::_gui_input(Ref<InputEvent> p_event) {
drag_touching = OS::get_singleton()->has_touchscreen_ui_hint();
drag_touching_deaccel = false;
if (drag_touching) {
- set_fixed_process(true);
+ set_physics_process(true);
}
}
@@ -2765,7 +2765,7 @@ void Tree::_notification(int p_what) {
drop_mode_flags = 0;
scrolling = false;
- set_fixed_process(false);
+ set_physics_process(false);
update();
}
if (p_what == NOTIFICATION_DRAG_BEGIN) {
@@ -2773,23 +2773,23 @@ void Tree::_notification(int p_what) {
single_select_defer = NULL;
if (cache.scroll_speed > 0 && get_rect().has_point(get_viewport()->get_mouse_position() - get_global_position())) {
scrolling = true;
- set_fixed_process(true);
+ set_physics_process(true);
}
}
- if (p_what == NOTIFICATION_FIXED_PROCESS) {
+ if (p_what == NOTIFICATION_PHYSICS_PROCESS) {
if (drag_touching) {
if (drag_touching_deaccel) {
float pos = v_scroll->get_value();
- pos += drag_speed * get_fixed_process_delta_time();
+ pos += drag_speed * get_physics_process_delta_time();
bool turnoff = false;
if (pos < 0) {
pos = 0;
turnoff = true;
- set_fixed_process(false);
+ set_physics_process(false);
drag_touching = false;
drag_touching_deaccel = false;
}
@@ -2801,7 +2801,7 @@ void Tree::_notification(int p_what) {
v_scroll->set_value(pos);
float sgn = drag_speed < 0 ? -1 : 1;
float val = Math::abs(drag_speed);
- val -= 1000 * get_fixed_process_delta_time();
+ val -= 1000 * get_physics_process_delta_time();
if (val < 0) {
turnoff = true;
@@ -2809,7 +2809,7 @@ void Tree::_notification(int p_what) {
drag_speed = sgn * val;
if (turnoff) {
- set_fixed_process(false);
+ set_physics_process(false);
drag_touching = false;
drag_touching_deaccel = false;
}
@@ -2834,7 +2834,7 @@ void Tree::_notification(int p_what) {
} else {
point.y = 0;
}
- point *= cache.scroll_speed * get_fixed_process_delta_time();
+ point *= cache.scroll_speed * get_physics_process_delta_time();
point += get_scroll();
h_scroll->set_value(point.x);
v_scroll->set_value(point.y);
diff --git a/scene/main/node.cpp b/scene/main/node.cpp
index 658701dcc7..c2a31b4a8b 100755
--- a/scene/main/node.cpp
+++ b/scene/main/node.cpp
@@ -54,13 +54,13 @@ void Node::_notification(int p_notification) {
get_script_instance()->call_multilevel(SceneStringNames::get_singleton()->_process, ptr, 1);
}
} break;
- case NOTIFICATION_FIXED_PROCESS: {
+ case NOTIFICATION_PHYSICS_PROCESS: {
if (get_script_instance()) {
- Variant time = get_fixed_process_delta_time();
+ Variant time = get_physics_process_delta_time();
const Variant *ptr[1] = { &time };
- get_script_instance()->call_multilevel(SceneStringNames::get_singleton()->_fixed_process, ptr, 1);
+ get_script_instance()->call_multilevel(SceneStringNames::get_singleton()->_physics_process, ptr, 1);
}
} break;
@@ -129,8 +129,8 @@ void Node::_notification(int p_notification) {
set_process(true);
}
- if (get_script_instance()->has_method(SceneStringNames::get_singleton()->_fixed_process)) {
- set_fixed_process(true);
+ if (get_script_instance()->has_method(SceneStringNames::get_singleton()->_physics_process)) {
+ set_physics_process(true);
}
get_script_instance()->call_multilevel_reversed(SceneStringNames::get_singleton()->_ready, NULL, 0);
@@ -367,46 +367,46 @@ void Node::move_child_notify(Node *p_child) {
// to be used when not wanted
}
-void Node::set_fixed_process(bool p_process) {
+void Node::set_physics_process(bool p_process) {
- if (data.fixed_process == p_process)
+ if (data.physics_process == p_process)
return;
- data.fixed_process = p_process;
+ data.physics_process = p_process;
- if (data.fixed_process)
- add_to_group("fixed_process", false);
+ if (data.physics_process)
+ add_to_group("physics_process", false);
else
- remove_from_group("fixed_process");
+ remove_from_group("physics_process");
- data.fixed_process = p_process;
- _change_notify("fixed_process");
+ data.physics_process = p_process;
+ _change_notify("physics_process");
}
-bool Node::is_fixed_processing() const {
+bool Node::is_physics_processing() const {
- return data.fixed_process;
+ return data.physics_process;
}
-void Node::set_fixed_process_internal(bool p_process_internal) {
+void Node::set_physics_process_internal(bool p_process_internal) {
- if (data.fixed_process_internal == p_process_internal)
+ if (data.physics_process_internal == p_process_internal)
return;
- data.fixed_process_internal = p_process_internal;
+ data.physics_process_internal = p_process_internal;
- if (data.fixed_process_internal)
- add_to_group("fixed_process_internal", false);
+ if (data.physics_process_internal)
+ add_to_group("physics_process_internal", false);
else
- remove_from_group("fixed_process_internal");
+ remove_from_group("physics_process_internal");
- data.fixed_process_internal = p_process_internal;
- _change_notify("fixed_process_internal");
+ data.physics_process_internal = p_process_internal;
+ _change_notify("physics_process_internal");
}
-bool Node::is_fixed_processing_internal() const {
+bool Node::is_physics_processing_internal() const {
- return data.fixed_process_internal;
+ return data.physics_process_internal;
}
void Node::set_pause_mode(PauseMode p_mode) {
@@ -1010,10 +1010,10 @@ bool Node::can_process() const {
return true;
}
-float Node::get_fixed_process_delta_time() const {
+float Node::get_physics_process_delta_time() const {
if (data.tree)
- return data.tree->get_fixed_process_time();
+ return data.tree->get_physics_process_time();
else
return 0;
}
@@ -2719,9 +2719,9 @@ void Node::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_filename"), &Node::get_filename);
ClassDB::bind_method(D_METHOD("propagate_notification", "what"), &Node::propagate_notification);
ClassDB::bind_method(D_METHOD("propagate_call", "method", "args", "parent_first"), &Node::propagate_call, DEFVAL(Array()), DEFVAL(false));
- ClassDB::bind_method(D_METHOD("set_fixed_process", "enable"), &Node::set_fixed_process);
- ClassDB::bind_method(D_METHOD("get_fixed_process_delta_time"), &Node::get_fixed_process_delta_time);
- ClassDB::bind_method(D_METHOD("is_fixed_processing"), &Node::is_fixed_processing);
+ ClassDB::bind_method(D_METHOD("set_physics_process", "enable"), &Node::set_physics_process);
+ ClassDB::bind_method(D_METHOD("get_physics_process_delta_time"), &Node::get_physics_process_delta_time);
+ ClassDB::bind_method(D_METHOD("is_physics_processing"), &Node::is_physics_processing);
ClassDB::bind_method(D_METHOD("get_process_delta_time"), &Node::get_process_delta_time);
ClassDB::bind_method(D_METHOD("set_process", "enable"), &Node::set_process);
ClassDB::bind_method(D_METHOD("is_processing"), &Node::is_processing);
@@ -2742,8 +2742,8 @@ void Node::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_process_internal", "enable"), &Node::set_process_internal);
ClassDB::bind_method(D_METHOD("is_processing_internal"), &Node::is_processing_internal);
- ClassDB::bind_method(D_METHOD("set_fixed_process_internal", "enable"), &Node::set_fixed_process_internal);
- ClassDB::bind_method(D_METHOD("is_fixed_processing_internal"), &Node::is_fixed_processing_internal);
+ ClassDB::bind_method(D_METHOD("set_physics_process_internal", "enable"), &Node::set_physics_process_internal);
+ ClassDB::bind_method(D_METHOD("is_physics_processing_internal"), &Node::is_physics_processing_internal);
ClassDB::bind_method(D_METHOD("get_tree"), &Node::get_tree);
@@ -2801,7 +2801,7 @@ void Node::_bind_methods() {
BIND_CONSTANT(NOTIFICATION_EXIT_TREE);
BIND_CONSTANT(NOTIFICATION_MOVED_IN_PARENT);
BIND_CONSTANT(NOTIFICATION_READY);
- BIND_CONSTANT(NOTIFICATION_FIXED_PROCESS);
+ BIND_CONSTANT(NOTIFICATION_PHYSICS_PROCESS);
BIND_CONSTANT(NOTIFICATION_PROCESS);
BIND_CONSTANT(NOTIFICATION_PARENTED);
BIND_CONSTANT(NOTIFICATION_UNPARENTED);
@@ -2813,7 +2813,7 @@ void Node::_bind_methods() {
BIND_CONSTANT(NOTIFICATION_PATH_CHANGED);
BIND_CONSTANT(NOTIFICATION_TRANSLATION_CHANGED);
BIND_CONSTANT(NOTIFICATION_INTERNAL_PROCESS);
- BIND_CONSTANT(NOTIFICATION_INTERNAL_FIXED_PROCESS);
+ BIND_CONSTANT(NOTIFICATION_INTERNAL_PHYSICS_PROCESS);
BIND_ENUM_CONSTANT(RPC_MODE_DISABLED);
BIND_ENUM_CONSTANT(RPC_MODE_REMOTE);
@@ -2835,7 +2835,7 @@ void Node::_bind_methods() {
ADD_SIGNAL(MethodInfo("tree_exited"));
//ADD_PROPERTYNZ( PropertyInfo( Variant::BOOL, "process/process" ),"set_process","is_processing") ;
- //ADD_PROPERTYNZ( PropertyInfo( Variant::BOOL, "process/fixed_process" ), "set_fixed_process","is_fixed_processing") ;
+ //ADD_PROPERTYNZ( PropertyInfo( Variant::BOOL, "process/physics_process" ), "set_physics_process","is_physics_processing") ;
//ADD_PROPERTYNZ( PropertyInfo( Variant::BOOL, "process/input" ), "set_process_input","is_processing_input" ) ;
//ADD_PROPERTYNZ( PropertyInfo( Variant::BOOL, "process/unhandled_input" ), "set_process_unhandled_input","is_processing_unhandled_input" ) ;
ADD_GROUP("Pause", "pause_");
@@ -2843,7 +2843,7 @@ void Node::_bind_methods() {
ADD_PROPERTYNZ(PropertyInfo(Variant::BOOL, "editor/display_folded", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_display_folded", "is_displayed_folded");
BIND_VMETHOD(MethodInfo("_process", PropertyInfo(Variant::REAL, "delta")));
- BIND_VMETHOD(MethodInfo("_fixed_process", PropertyInfo(Variant::REAL, "delta")));
+ BIND_VMETHOD(MethodInfo("_physics_process", PropertyInfo(Variant::REAL, "delta")));
BIND_VMETHOD(MethodInfo("_enter_tree"));
BIND_VMETHOD(MethodInfo("_exit_tree"));
BIND_VMETHOD(MethodInfo("_ready"));
@@ -2872,9 +2872,9 @@ Node::Node() {
data.blocked = 0;
data.parent = NULL;
data.tree = NULL;
- data.fixed_process = false;
+ data.physics_process = false;
data.idle_process = false;
- data.fixed_process_internal = false;
+ data.physics_process_internal = false;
data.idle_process_internal = false;
data.inside_tree = false;
data.ready_notified = false;
diff --git a/scene/main/node.h b/scene/main/node.h
index 12d6310062..c43e96063f 100644
--- a/scene/main/node.h
+++ b/scene/main/node.h
@@ -121,10 +121,10 @@ private:
// variables used to properly sort the node when processing, ignored otherwise
//should move all the stuff below to bits
- bool fixed_process;
+ bool physics_process;
bool idle_process;
- bool fixed_process_internal;
+ bool physics_process_internal;
bool idle_process_internal;
bool input;
@@ -213,7 +213,7 @@ public:
NOTIFICATION_READY = 13,
NOTIFICATION_PAUSED = 14,
NOTIFICATION_UNPAUSED = 15,
- NOTIFICATION_FIXED_PROCESS = 16,
+ NOTIFICATION_PHYSICS_PROCESS = 16,
NOTIFICATION_PROCESS = 17,
NOTIFICATION_PARENTED = 18,
NOTIFICATION_UNPARENTED = 19,
@@ -223,7 +223,7 @@ public:
NOTIFICATION_PATH_CHANGED = 23,
NOTIFICATION_TRANSLATION_CHANGED = 24,
NOTIFICATION_INTERNAL_PROCESS = 25,
- NOTIFICATION_INTERNAL_FIXED_PROCESS = 26,
+ NOTIFICATION_INTERNAL_PHYSICS_PROCESS = 26,
};
@@ -299,16 +299,16 @@ public:
void propagate_call(const StringName &p_method, const Array &p_args = Array(), const bool p_parent_first = false);
/* PROCESSING */
- void set_fixed_process(bool p_process);
- float get_fixed_process_delta_time() const;
- bool is_fixed_processing() const;
+ void set_physics_process(bool p_process);
+ float get_physics_process_delta_time() const;
+ bool is_physics_processing() const;
void set_process(bool p_idle_process);
float get_process_delta_time() const;
bool is_processing() const;
- void set_fixed_process_internal(bool p_process_internal);
- bool is_fixed_processing_internal() const;
+ void set_physics_process_internal(bool p_process_internal);
+ bool is_physics_processing_internal() const;
void set_process_internal(bool p_idle_process_internal);
bool is_processing_internal() const;
diff --git a/scene/main/scene_tree.cpp b/scene/main/scene_tree.cpp
index 5a1388458b..7a28e2a6f8 100644
--- a/scene/main/scene_tree.cpp
+++ b/scene/main/scene_tree.cpp
@@ -446,12 +446,12 @@ bool SceneTree::iteration(float p_time) {
_flush_transform_notifications();
MainLoop::iteration(p_time);
- fixed_process_time = p_time;
+ physics_process_time = p_time;
- emit_signal("fixed_frame");
+ emit_signal("physics_frame");
- _notify_group_pause("fixed_process_internal", Node::NOTIFICATION_INTERNAL_FIXED_PROCESS);
- _notify_group_pause("fixed_process", Node::NOTIFICATION_FIXED_PROCESS);
+ _notify_group_pause("physics_process_internal", Node::NOTIFICATION_INTERNAL_PHYSICS_PROCESS);
+ _notify_group_pause("physics_process", Node::NOTIFICATION_PHYSICS_PROCESS);
_flush_ugc();
MessageQueue::get_singleton()->flush(); //small little hack
_flush_transform_notifications();
@@ -2194,7 +2194,7 @@ void SceneTree::_bind_methods() {
ADD_SIGNAL(MethodInfo("node_configuration_warning_changed", PropertyInfo(Variant::OBJECT, "node")));
ADD_SIGNAL(MethodInfo("idle_frame"));
- ADD_SIGNAL(MethodInfo("fixed_frame"));
+ ADD_SIGNAL(MethodInfo("physics_frame"));
ADD_SIGNAL(MethodInfo("files_dropped", PropertyInfo(Variant::POOL_STRING_ARRAY, "files"), PropertyInfo(Variant::INT, "screen")));
ADD_SIGNAL(MethodInfo("network_peer_connected", PropertyInfo(Variant::INT, "id")));
@@ -2254,7 +2254,7 @@ SceneTree::SceneTree() {
collision_debug_contacts = GLOBAL_DEF("debug/shapes/collision/max_contacts_displayed", 10000);
tree_version = 1;
- fixed_process_time = 1;
+ physics_process_time = 1;
idle_process_time = 1;
last_id = 1;
root = NULL;
diff --git a/scene/main/scene_tree.h b/scene/main/scene_tree.h
index c116bec4fc..f3e689adab 100644
--- a/scene/main/scene_tree.h
+++ b/scene/main/scene_tree.h
@@ -105,7 +105,7 @@ private:
Viewport *root;
uint64_t tree_version;
- float fixed_process_time;
+ float physics_process_time;
float idle_process_time;
bool accept_quit;
bool quit_on_go_back;
@@ -358,7 +358,7 @@ public:
void set_input_as_handled();
bool is_input_handled();
- _FORCE_INLINE_ float get_fixed_process_time() const { return fixed_process_time; }
+ _FORCE_INLINE_ float get_physics_process_time() const { return physics_process_time; }
_FORCE_INLINE_ float get_idle_process_time() const { return idle_process_time; }
#ifdef TOOLS_ENABLED
diff --git a/scene/main/timer.cpp b/scene/main/timer.cpp
index df7d609ac0..23854b5f59 100755
--- a/scene/main/timer.cpp
+++ b/scene/main/timer.cpp
@@ -47,7 +47,7 @@ void Timer::_notification(int p_what) {
}
} break;
case NOTIFICATION_INTERNAL_PROCESS: {
- if (timer_process_mode == TIMER_PROCESS_FIXED || !is_processing_internal())
+ if (timer_process_mode == TIMER_PROCESS_PHYSICS || !is_processing_internal())
return;
time_left -= get_process_delta_time();
@@ -61,10 +61,10 @@ void Timer::_notification(int p_what) {
}
} break;
- case NOTIFICATION_INTERNAL_FIXED_PROCESS: {
- if (timer_process_mode == TIMER_PROCESS_IDLE || !is_fixed_processing_internal())
+ case NOTIFICATION_INTERNAL_PHYSICS_PROCESS: {
+ if (timer_process_mode == TIMER_PROCESS_IDLE || !is_physics_processing_internal())
return;
- time_left -= get_fixed_process_delta_time();
+ time_left -= get_physics_process_delta_time();
if (time_left < 0) {
if (!one_shot)
@@ -144,16 +144,16 @@ void Timer::set_timer_process_mode(TimerProcessMode p_mode) {
return;
switch (timer_process_mode) {
- case TIMER_PROCESS_FIXED:
- if (is_fixed_processing_internal()) {
- set_fixed_process_internal(false);
+ case TIMER_PROCESS_PHYSICS:
+ if (is_physics_processing_internal()) {
+ set_physics_process_internal(false);
set_process_internal(true);
}
break;
case TIMER_PROCESS_IDLE:
if (is_processing_internal()) {
set_process_internal(false);
- set_fixed_process_internal(true);
+ set_physics_process_internal(true);
}
break;
}
@@ -167,7 +167,7 @@ Timer::TimerProcessMode Timer::get_timer_process_mode() const {
void Timer::_set_process(bool p_process, bool p_force) {
switch (timer_process_mode) {
- case TIMER_PROCESS_FIXED: set_fixed_process_internal(p_process && !paused); break;
+ case TIMER_PROCESS_PHYSICS: set_physics_process_internal(p_process && !paused); break;
case TIMER_PROCESS_IDLE: set_process_internal(p_process && !paused); break;
}
processing = p_process;
@@ -204,7 +204,7 @@ void Timer::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "one_shot"), "set_one_shot", "is_one_shot");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "autostart"), "set_autostart", "has_autostart");
- BIND_ENUM_CONSTANT(TIMER_PROCESS_FIXED);
+ BIND_ENUM_CONSTANT(TIMER_PROCESS_PHYSICS);
BIND_ENUM_CONSTANT(TIMER_PROCESS_IDLE);
}
diff --git a/scene/main/timer.h b/scene/main/timer.h
index 0cd92f12de..a02adbb0a3 100755
--- a/scene/main/timer.h
+++ b/scene/main/timer.h
@@ -50,7 +50,7 @@ protected:
public:
enum TimerProcessMode {
- TIMER_PROCESS_FIXED,
+ TIMER_PROCESS_PHYSICS,
TIMER_PROCESS_IDLE,
};
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp
index e19f2031dd..37a393b55b 100644
--- a/scene/main/viewport.cpp
+++ b/scene/main/viewport.cpp
@@ -456,10 +456,10 @@ void Viewport::_notification(int p_what) {
VS::get_singleton()->viewport_set_active(viewport, false);
} break;
- case NOTIFICATION_FIXED_PROCESS: {
+ case NOTIFICATION_PHYSICS_PROCESS: {
if (gui.tooltip_timer >= 0) {
- gui.tooltip_timer -= get_fixed_process_delta_time();
+ gui.tooltip_timer -= get_physics_process_delta_time();
if (gui.tooltip_timer < 0) {
_gui_show_tooltip();
}
@@ -2453,7 +2453,7 @@ Rect2 Viewport::get_attach_to_screen_rect() const {
void Viewport::set_physics_object_picking(bool p_enable) {
physics_object_picking = p_enable;
- set_fixed_process(physics_object_picking);
+ set_physics_process(physics_object_picking);
if (!physics_object_picking)
physics_picking_events.clear();
}
diff --git a/scene/scene_string_names.cpp b/scene/scene_string_names.cpp
index 6b7168a529..d9770ec3f3 100644
--- a/scene/scene_string_names.cpp
+++ b/scene/scene_string_names.cpp
@@ -87,7 +87,7 @@ SceneStringNames::SceneStringNames() {
_get_gizmo_geometry = StaticCString::create("_get_gizmo_geometry");
_can_gizmo_scale = StaticCString::create("_can_gizmo_scale");
- _fixed_process = StaticCString::create("_fixed_process");
+ _physics_process = StaticCString::create("_physics_process");
_process = StaticCString::create("_process");
_enter_tree = StaticCString::create("_enter_tree");
diff --git a/scene/scene_string_names.h b/scene/scene_string_names.h
index 8676b8436e..3b110e7a62 100644
--- a/scene/scene_string_names.h
+++ b/scene/scene_string_names.h
@@ -106,7 +106,7 @@ public:
StringName _get_gizmo_geometry;
StringName _can_gizmo_scale;
- StringName _fixed_process;
+ StringName _physics_process;
StringName _process;
StringName _enter_world;
StringName _exit_world;
diff --git a/servers/physics/physics_server_sw.cpp b/servers/physics/physics_server_sw.cpp
index a0c9f9cd42..1553c3c8e6 100644
--- a/servers/physics/physics_server_sw.cpp
+++ b/servers/physics/physics_server_sw.cpp
@@ -183,7 +183,7 @@ PhysicsDirectSpaceState *PhysicsServerSW::space_get_direct_state(RID p_space) {
ERR_FAIL_COND_V(!space, NULL);
if (!doing_sync || space->is_locked()) {
- ERR_EXPLAIN("Space state is inaccessible right now, wait for iteration or fixed process notification.");
+ ERR_EXPLAIN("Space state is inaccessible right now, wait for iteration or physics process notification.");
ERR_FAIL_V(NULL);
}
diff --git a/servers/physics/physics_server_sw.h b/servers/physics/physics_server_sw.h
index 99ba302acd..aea3e150b0 100644
--- a/servers/physics/physics_server_sw.h
+++ b/servers/physics/physics_server_sw.h
@@ -95,7 +95,7 @@ public:
virtual void space_set_param(RID p_space, SpaceParameter p_param, real_t p_value);
virtual real_t space_get_param(RID p_space, SpaceParameter p_param) const;
- // this function only works on fixed process, errors and returns null otherwise
+ // this function only works on physics process, errors and returns null otherwise
virtual PhysicsDirectSpaceState *space_get_direct_state(RID p_space);
virtual void space_set_debug_contacts(RID p_space, int p_max_contacts);
diff --git a/servers/physics_2d/physics_2d_server_sw.cpp b/servers/physics_2d/physics_2d_server_sw.cpp
index e9e7122af3..2b7505169a 100644
--- a/servers/physics_2d/physics_2d_server_sw.cpp
+++ b/servers/physics_2d/physics_2d_server_sw.cpp
@@ -270,7 +270,7 @@ Physics2DDirectSpaceState *Physics2DServerSW::space_get_direct_state(RID p_space
ERR_FAIL_COND_V(!space, NULL);
if ((using_threads && !doing_sync) || space->is_locked()) {
- ERR_EXPLAIN("Space state is inaccessible right now, wait for iteration or fixed process notification.");
+ ERR_EXPLAIN("Space state is inaccessible right now, wait for iteration or physics process notification.");
ERR_FAIL_V(NULL);
}
diff --git a/servers/physics_2d/physics_2d_server_sw.h b/servers/physics_2d/physics_2d_server_sw.h
index dd310d7a93..0ebd43be53 100644
--- a/servers/physics_2d/physics_2d_server_sw.h
+++ b/servers/physics_2d/physics_2d_server_sw.h
@@ -103,7 +103,7 @@ public:
virtual Vector<Vector2> space_get_contacts(RID p_space) const;
virtual int space_get_contact_count(RID p_space) const;
- // this function only works on fixed process, errors and returns null otherwise
+ // this function only works on physics process, errors and returns null otherwise
virtual Physics2DDirectSpaceState *space_get_direct_state(RID p_space);
/* AREA API */
diff --git a/servers/physics_2d/physics_2d_server_wrap_mt.h b/servers/physics_2d/physics_2d_server_wrap_mt.h
index 189419e8e4..5bec2f7cbd 100644
--- a/servers/physics_2d/physics_2d_server_wrap_mt.h
+++ b/servers/physics_2d/physics_2d_server_wrap_mt.h
@@ -111,7 +111,7 @@ public:
FUNC3(space_set_param, RID, SpaceParameter, real_t);
FUNC2RC(real_t, space_get_param, RID, SpaceParameter);
- // this function only works on fixed process, errors and returns null otherwise
+ // this function only works on physics process, errors and returns null otherwise
Physics2DDirectSpaceState *space_get_direct_state(RID p_space) {
ERR_FAIL_COND_V(main_thread != Thread::get_caller_id(), NULL);
diff --git a/servers/physics_2d_server.h b/servers/physics_2d_server.h
index ddf89663c0..34f885db1d 100644
--- a/servers/physics_2d_server.h
+++ b/servers/physics_2d_server.h
@@ -283,7 +283,7 @@ public:
virtual void space_set_param(RID p_space, SpaceParameter p_param, real_t p_value) = 0;
virtual real_t space_get_param(RID p_space, SpaceParameter p_param) const = 0;
- // this function only works on fixed process, errors and returns null otherwise
+ // this function only works on physics process, errors and returns null otherwise
virtual Physics2DDirectSpaceState *space_get_direct_state(RID p_space) = 0;
virtual void space_set_debug_contacts(RID p_space, int p_max_contacts) = 0;
diff --git a/servers/physics_server.h b/servers/physics_server.h
index 32aaafa28c..7012caeae6 100644
--- a/servers/physics_server.h
+++ b/servers/physics_server.h
@@ -276,7 +276,7 @@ public:
virtual void space_set_param(RID p_space, SpaceParameter p_param, real_t p_value) = 0;
virtual real_t space_get_param(RID p_space, SpaceParameter p_param) const = 0;
- // this function only works on fixed process, errors and returns null otherwise
+ // this function only works on physics process, errors and returns null otherwise
virtual PhysicsDirectSpaceState *space_get_direct_state(RID p_space) = 0;
virtual void space_set_debug_contacts(RID p_space, int p_max_contacts) = 0;