diff options
Diffstat (limited to 'scene/3d')
31 files changed, 154 insertions, 154 deletions
diff --git a/scene/3d/area_3d.cpp b/scene/3d/area_3d.cpp index 5b02a91793..17ae553e5e 100644 --- a/scene/3d/area_3d.cpp +++ b/scene/3d/area_3d.cpp @@ -301,8 +301,8 @@ void Area3D::set_monitoring(bool p_enable) { PhysicsServer3D::get_singleton()->area_set_monitor_callback(get_rid(), this, SceneStringNames::get_singleton()->_body_inout); PhysicsServer3D::get_singleton()->area_set_area_monitor_callback(get_rid(), this, SceneStringNames::get_singleton()->_area_inout); } else { - PhysicsServer3D::get_singleton()->area_set_monitor_callback(get_rid(), NULL, StringName()); - PhysicsServer3D::get_singleton()->area_set_area_monitor_callback(get_rid(), NULL, StringName()); + PhysicsServer3D::get_singleton()->area_set_monitor_callback(get_rid(), nullptr, StringName()); + PhysicsServer3D::get_singleton()->area_set_area_monitor_callback(get_rid(), nullptr, StringName()); _clear_monitoring(); } } diff --git a/scene/3d/arvr_nodes.cpp b/scene/3d/arvr_nodes.cpp index ce7c885a40..537c094ceb 100644 --- a/scene/3d/arvr_nodes.cpp +++ b/scene/3d/arvr_nodes.cpp @@ -40,14 +40,14 @@ void ARVRCamera::_notification(int p_what) { case NOTIFICATION_ENTER_TREE: { // need to find our ARVROrigin parent and let it know we're its camera! ARVROrigin *origin = Object::cast_to<ARVROrigin>(get_parent()); - if (origin != NULL) { + if (origin != nullptr) { origin->set_tracked_camera(this); } }; break; case NOTIFICATION_EXIT_TREE: { // need to find our ARVROrigin parent and let it know we're no longer its camera! ARVROrigin *origin = Object::cast_to<ARVROrigin>(get_parent()); - if (origin != NULL) { + if (origin != nullptr) { origin->clear_tracked_camera_if(this); } }; break; @@ -60,7 +60,7 @@ String ARVRCamera::get_configuration_warning() const { // must be child node of ARVROrigin! ARVROrigin *origin = Object::cast_to<ARVROrigin>(get_parent()); - if (origin == NULL) { + if (origin == nullptr) { return TTR("ARVRCamera must have an ARVROrigin node as its parent."); }; @@ -192,7 +192,7 @@ void ARVRController::_notification(int p_what) { // find the tracker for our controller ARVRPositionalTracker *tracker = arvr_server->find_by_type_and_id(ARVRServer::TRACKER_CONTROLLER, controller_id); - if (tracker == NULL) { + if (tracker == nullptr) { // this controller is currently turned off is_active = false; button_states = 0; @@ -279,7 +279,7 @@ String ARVRController::get_controller_name(void) const { ERR_FAIL_NULL_V(arvr_server, String()); ARVRPositionalTracker *tracker = arvr_server->find_by_type_and_id(ARVRServer::TRACKER_CONTROLLER, controller_id); - if (tracker == NULL) { + if (tracker == nullptr) { return String("Not connected"); }; @@ -292,7 +292,7 @@ int ARVRController::get_joystick_id() const { ERR_FAIL_NULL_V(arvr_server, 0); ARVRPositionalTracker *tracker = arvr_server->find_by_type_and_id(ARVRServer::TRACKER_CONTROLLER, controller_id); - if (tracker == NULL) { + if (tracker == nullptr) { // No tracker? no joystick id... (0 is our first joystick) return -1; }; @@ -324,7 +324,7 @@ real_t ARVRController::get_rumble() const { ERR_FAIL_NULL_V(arvr_server, 0.0); ARVRPositionalTracker *tracker = arvr_server->find_by_type_and_id(ARVRServer::TRACKER_CONTROLLER, controller_id); - if (tracker == NULL) { + if (tracker == nullptr) { return 0.0; }; @@ -337,7 +337,7 @@ void ARVRController::set_rumble(real_t p_rumble) { ERR_FAIL_NULL(arvr_server); ARVRPositionalTracker *tracker = arvr_server->find_by_type_and_id(ARVRServer::TRACKER_CONTROLLER, controller_id); - if (tracker != NULL) { + if (tracker != nullptr) { tracker->set_rumble(p_rumble); }; }; @@ -356,7 +356,7 @@ ARVRPositionalTracker::TrackerHand ARVRController::get_hand() const { ERR_FAIL_NULL_V(arvr_server, ARVRPositionalTracker::TRACKER_HAND_UNKNOWN); ARVRPositionalTracker *tracker = arvr_server->find_by_type_and_id(ARVRServer::TRACKER_CONTROLLER, controller_id); - if (tracker == NULL) { + if (tracker == nullptr) { return ARVRPositionalTracker::TRACKER_HAND_UNKNOWN; }; @@ -369,7 +369,7 @@ String ARVRController::get_configuration_warning() const { // must be child node of ARVROrigin! ARVROrigin *origin = Object::cast_to<ARVROrigin>(get_parent()); - if (origin == NULL) { + if (origin == nullptr) { return TTR("ARVRController must have an ARVROrigin node as its parent."); }; @@ -407,7 +407,7 @@ void ARVRAnchor::_notification(int p_what) { // find the tracker for our anchor ARVRPositionalTracker *tracker = arvr_server->find_by_type_and_id(ARVRServer::TRACKER_ANCHOR, anchor_id); - if (tracker == NULL) { + if (tracker == nullptr) { // this anchor is currently not available is_active = false; } else { @@ -479,7 +479,7 @@ String ARVRAnchor::get_anchor_name(void) const { ERR_FAIL_NULL_V(arvr_server, String()); ARVRPositionalTracker *tracker = arvr_server->find_by_type_and_id(ARVRServer::TRACKER_ANCHOR, anchor_id); - if (tracker == NULL) { + if (tracker == nullptr) { return String("Not connected"); }; @@ -496,7 +496,7 @@ String ARVRAnchor::get_configuration_warning() const { // must be child node of ARVROrigin! ARVROrigin *origin = Object::cast_to<ARVROrigin>(get_parent()); - if (origin == NULL) { + if (origin == nullptr) { return TTR("ARVRAnchor must have an ARVROrigin node as its parent."); }; @@ -535,7 +535,7 @@ String ARVROrigin::get_configuration_warning() const { if (!is_visible() || !is_inside_tree()) return String(); - if (tracked_camera == NULL) + if (tracked_camera == nullptr) return TTR("ARVROrigin requires an ARVRCamera child node."); return String(); @@ -553,7 +553,7 @@ void ARVROrigin::set_tracked_camera(ARVRCamera *p_tracked_camera) { void ARVROrigin::clear_tracked_camera_if(ARVRCamera *p_tracked_camera) { if (tracked_camera == p_tracked_camera) { - tracked_camera = NULL; + tracked_camera = nullptr; }; }; @@ -591,7 +591,7 @@ void ARVROrigin::_notification(int p_what) { // check if we have a primary interface Ref<ARVRInterface> arvr_interface = arvr_server->get_primary_interface(); - if (arvr_interface.is_valid() && tracked_camera != NULL) { + if (arvr_interface.is_valid() && tracked_camera != nullptr) { // get our positioning transform for our headset Transform t = arvr_interface->get_transform_for_eye(ARVRInterface::EYE_MONO, Transform()); @@ -613,7 +613,7 @@ void ARVROrigin::_notification(int p_what) { }; ARVROrigin::ARVROrigin() { - tracked_camera = NULL; + tracked_camera = nullptr; }; ARVROrigin::~ARVROrigin(){ diff --git a/scene/3d/audio_stream_player_3d.cpp b/scene/3d/audio_stream_player_3d.cpp index 9f5170fa98..097368853e 100644 --- a/scene/3d/audio_stream_player_3d.cpp +++ b/scene/3d/audio_stream_player_3d.cpp @@ -401,7 +401,7 @@ void AudioStreamPlayer3D::_notification(int p_what) { PhysicsDirectSpaceState3D::ShapeResult sr[MAX_INTERSECT_AREAS]; int areas = space_state->intersect_point(global_pos, sr, MAX_INTERSECT_AREAS, Set<RID>(), area_mask, false, true); - Area3D *area = NULL; + Area3D *area = nullptr; for (int i = 0; i < areas; i++) { if (!sr[i].collider) diff --git a/scene/3d/audio_stream_player_3d.h b/scene/3d/audio_stream_player_3d.h index 1cce0c77d5..13e08339e2 100644 --- a/scene/3d/audio_stream_player_3d.h +++ b/scene/3d/audio_stream_player_3d.h @@ -82,7 +82,7 @@ private: Output() { filter_gain = 0; - viewport = NULL; + viewport = nullptr; reverb_bus_index = -1; bus_index = -1; } diff --git a/scene/3d/baked_lightmap.cpp b/scene/3d/baked_lightmap.cpp index 05e3f3fefa..6bde56104e 100644 --- a/scene/3d/baked_lightmap.cpp +++ b/scene/3d/baked_lightmap.cpp @@ -193,9 +193,9 @@ BakedLightmapData::~BakedLightmapData() { /////////////////////////// -BakedLightmap::BakeBeginFunc BakedLightmap::bake_begin_function = NULL; -BakedLightmap::BakeStepFunc BakedLightmap::bake_step_function = NULL; -BakedLightmap::BakeEndFunc BakedLightmap::bake_end_function = NULL; +BakedLightmap::BakeBeginFunc BakedLightmap::bake_begin_function = nullptr; +BakedLightmap::BakeStepFunc BakedLightmap::bake_step_function = nullptr; +BakedLightmap::BakeEndFunc BakedLightmap::bake_end_function = nullptr; void BakedLightmap::set_bake_cell_size(float p_cell_size) { bake_cell_size = p_cell_size; diff --git a/scene/3d/camera_3d.cpp b/scene/3d/camera_3d.cpp index 7980c15f89..30ab4d463b 100644 --- a/scene/3d/camera_3d.cpp +++ b/scene/3d/camera_3d.cpp @@ -138,7 +138,7 @@ void Camera3D::_notification(int p_what) { if (viewport) { viewport->_camera_remove(this); - viewport = NULL; + viewport = nullptr; } } break; @@ -241,7 +241,7 @@ void Camera3D::clear_current(bool p_enable_next) { return; if (get_viewport()->get_camera() == this) { - get_viewport()->_camera_set(NULL); + get_viewport()->_camera_set(nullptr); if (p_enable_next) { get_viewport()->_camera_make_next_current(this); @@ -703,7 +703,7 @@ Camera3D::Camera3D() { near = 0; far = 0; current = false; - viewport = NULL; + viewport = nullptr; force_change = false; mode = PROJECTION_PERSPECTIVE; set_perspective(70.0, 0.05, 100.0); diff --git a/scene/3d/collision_object_3d.cpp b/scene/3d/collision_object_3d.cpp index 6ee0512546..e6cd7bfe7e 100644 --- a/scene/3d/collision_object_3d.cpp +++ b/scene/3d/collision_object_3d.cpp @@ -245,7 +245,7 @@ Transform CollisionObject3D::shape_owner_get_transform(uint32_t p_owner) const { Object *CollisionObject3D::shape_owner_get_owner(uint32_t p_owner) const { - ERR_FAIL_COND_V(!shapes.has(p_owner), NULL); + ERR_FAIL_COND_V(!shapes.has(p_owner), nullptr); return shapes[p_owner].owner; } diff --git a/scene/3d/collision_object_3d.h b/scene/3d/collision_object_3d.h index 6a70f56caa..67d3aed3c8 100644 --- a/scene/3d/collision_object_3d.h +++ b/scene/3d/collision_object_3d.h @@ -56,7 +56,7 @@ class CollisionObject3D : public Node3D { ShapeData() { disabled = false; - owner = NULL; + owner = nullptr; } }; diff --git a/scene/3d/collision_polygon_3d.cpp b/scene/3d/collision_polygon_3d.cpp index 982205137b..66bd903eeb 100644 --- a/scene/3d/collision_polygon_3d.cpp +++ b/scene/3d/collision_polygon_3d.cpp @@ -112,7 +112,7 @@ void CollisionPolygon3D::_notification(int p_what) { parent->remove_shape_owner(owner_id); } owner_id = 0; - parent = NULL; + parent = nullptr; } break; } } @@ -201,7 +201,7 @@ CollisionPolygon3D::CollisionPolygon3D() { aabb = AABB(Vector3(-1, -1, -1), Vector3(2, 2, 2)); depth = 1.0; set_notify_local_transform(true); - parent = NULL; + parent = nullptr; owner_id = 0; disabled = false; } diff --git a/scene/3d/collision_shape_3d.cpp b/scene/3d/collision_shape_3d.cpp index 6aecfd08cc..a66e84ac3c 100644 --- a/scene/3d/collision_shape_3d.cpp +++ b/scene/3d/collision_shape_3d.cpp @@ -105,7 +105,7 @@ void CollisionShape3D::_notification(int p_what) { parent->remove_shape_owner(owner_id); } owner_id = 0; - parent = NULL; + parent = nullptr; } break; } } @@ -200,8 +200,8 @@ CollisionShape3D::CollisionShape3D() { //indicator = RenderingServer::get_singleton()->mesh_create(); disabled = false; - debug_shape = NULL; - parent = NULL; + debug_shape = nullptr; + parent = nullptr; owner_id = 0; set_notify_local_transform(true); } @@ -217,7 +217,7 @@ void CollisionShape3D::_update_debug_shape() { if (debug_shape) { debug_shape->queue_delete(); - debug_shape = NULL; + debug_shape = nullptr; } Ref<Shape3D> s = get_shape(); diff --git a/scene/3d/cpu_particles_3d.cpp b/scene/3d/cpu_particles_3d.cpp index 2226b0ed83..12c105b0f4 100644 --- a/scene/3d/cpu_particles_3d.cpp +++ b/scene/3d/cpu_particles_3d.cpp @@ -208,13 +208,13 @@ String CPUParticles3D::get_configuration_warning() const { if (get_mesh().is_valid()) { mesh_found = true; for (int j = 0; j < get_mesh()->get_surface_count(); j++) { - anim_material_found = Object::cast_to<ShaderMaterial>(get_mesh()->surface_get_material(j).ptr()) != NULL; + anim_material_found = Object::cast_to<ShaderMaterial>(get_mesh()->surface_get_material(j).ptr()) != nullptr; StandardMaterial3D *spat = Object::cast_to<StandardMaterial3D>(get_mesh()->surface_get_material(j).ptr()); anim_material_found = anim_material_found || (spat && spat->get_billboard_mode() == StandardMaterial3D::BILLBOARD_PARTICLES); } } - anim_material_found = anim_material_found || Object::cast_to<ShaderMaterial>(get_material_override().ptr()) != NULL; + anim_material_found = anim_material_found || Object::cast_to<ShaderMaterial>(get_material_override().ptr()) != nullptr; StandardMaterial3D *spat = Object::cast_to<StandardMaterial3D>(get_material_override().ptr()); anim_material_found = anim_material_found || (spat && spat->get_billboard_mode() == StandardMaterial3D::BILLBOARD_PARTICLES); @@ -1022,7 +1022,7 @@ void CPUParticles3D::_update_particle_data_buffer() { int pc = particles.size(); int *ow; - int *order = NULL; + int *order = nullptr; float *w = particle_data.ptrw(); const Particle *r = particles.ptr(); diff --git a/scene/3d/gi_probe.cpp b/scene/3d/gi_probe.cpp index 607b176cdd..6d571ee4f2 100644 --- a/scene/3d/gi_probe.cpp +++ b/scene/3d/gi_probe.cpp @@ -403,9 +403,9 @@ void GIProbe::_find_meshes(Node *p_at_node, List<PlotMesh> &plot_meshes) { } } -GIProbe::BakeBeginFunc GIProbe::bake_begin_function = NULL; -GIProbe::BakeStepFunc GIProbe::bake_step_function = NULL; -GIProbe::BakeEndFunc GIProbe::bake_end_function = NULL; +GIProbe::BakeBeginFunc GIProbe::bake_begin_function = nullptr; +GIProbe::BakeStepFunc GIProbe::bake_step_function = nullptr; +GIProbe::BakeEndFunc GIProbe::bake_end_function = nullptr; Vector3i GIProbe::get_estimated_cell_size() const { static const int subdiv_value[SUBDIV_MAX] = { 6, 7, 8, 9 }; @@ -512,7 +512,7 @@ void GIProbe::bake(Node *p_from_node, bool p_create_visual_debug) { void GIProbe::_debug_bake() { - bake(NULL, true); + bake(nullptr, true); } AABB GIProbe::get_aabb() const { diff --git a/scene/3d/gi_probe.h b/scene/3d/gi_probe.h index c00ee2cb73..28b533e82d 100644 --- a/scene/3d/gi_probe.h +++ b/scene/3d/gi_probe.h @@ -161,7 +161,7 @@ public: Vector3 get_extents() const; Vector3i get_estimated_cell_size() const; - void bake(Node *p_from_node = NULL, bool p_create_visual_debug = false); + void bake(Node *p_from_node = nullptr, bool p_create_visual_debug = false); virtual AABB get_aabb() const; virtual Vector<Face3> get_faces(uint32_t p_usage_flags) const; diff --git a/scene/3d/gpu_particles_3d.cpp b/scene/3d/gpu_particles_3d.cpp index 8646d4f290..7744c477cb 100644 --- a/scene/3d/gpu_particles_3d.cpp +++ b/scene/3d/gpu_particles_3d.cpp @@ -253,7 +253,7 @@ String GPUParticles3D::get_configuration_warning() const { if (draw_passes[i].is_valid()) { meshes_found = true; for (int j = 0; j < draw_passes[i]->get_surface_count(); j++) { - anim_material_found = Object::cast_to<ShaderMaterial>(draw_passes[i]->surface_get_material(j).ptr()) != NULL; + anim_material_found = Object::cast_to<ShaderMaterial>(draw_passes[i]->surface_get_material(j).ptr()) != nullptr; StandardMaterial3D *spat = Object::cast_to<StandardMaterial3D>(draw_passes[i]->surface_get_material(j).ptr()); anim_material_found = anim_material_found || (spat && spat->get_billboard_mode() == StandardMaterial3D::BILLBOARD_PARTICLES); } @@ -261,7 +261,7 @@ String GPUParticles3D::get_configuration_warning() const { } } - anim_material_found = anim_material_found || Object::cast_to<ShaderMaterial>(get_material_override().ptr()) != NULL; + anim_material_found = anim_material_found || Object::cast_to<ShaderMaterial>(get_material_override().ptr()) != nullptr; StandardMaterial3D *spat = Object::cast_to<StandardMaterial3D>(get_material_override().ptr()); anim_material_found = anim_material_found || (spat && spat->get_billboard_mode() == StandardMaterial3D::BILLBOARD_PARTICLES); diff --git a/scene/3d/listener_3d.cpp b/scene/3d/listener_3d.cpp index f352eb24b1..426e34ea80 100644 --- a/scene/3d/listener_3d.cpp +++ b/scene/3d/listener_3d.cpp @@ -131,7 +131,7 @@ void Listener3D::clear_current() { return; if (get_viewport()->get_listener() == this) { - get_viewport()->_listener_set(NULL); + get_viewport()->_listener_set(nullptr); get_viewport()->_listener_make_next_current(this); } } diff --git a/scene/3d/mesh_instance_3d.cpp b/scene/3d/mesh_instance_3d.cpp index 30aabf6e00..d56a095a5b 100644 --- a/scene/3d/mesh_instance_3d.cpp +++ b/scene/3d/mesh_instance_3d.cpp @@ -217,11 +217,11 @@ Vector<Face3> MeshInstance3D::get_faces(uint32_t p_usage_flags) const { Node *MeshInstance3D::create_trimesh_collision_node() { if (mesh.is_null()) - return NULL; + return nullptr; Ref<Shape3D> shape = mesh->create_trimesh_shape(); if (shape.is_null()) - return NULL; + return nullptr; StaticBody3D *static_body = memnew(StaticBody3D); CollisionShape3D *cshape = memnew(CollisionShape3D); @@ -247,11 +247,11 @@ void MeshInstance3D::create_trimesh_collision() { Node *MeshInstance3D::create_convex_collision_node() { if (mesh.is_null()) - return NULL; + return nullptr; Ref<Shape3D> shape = mesh->create_convex_shape(); if (shape.is_null()) - return NULL; + return nullptr; StaticBody3D *static_body = memnew(StaticBody3D); CollisionShape3D *cshape = memnew(CollisionShape3D); diff --git a/scene/3d/navigation_agent_3d.cpp b/scene/3d/navigation_agent_3d.cpp index a131684a8a..0449ab15b7 100644 --- a/scene/3d/navigation_agent_3d.cpp +++ b/scene/3d/navigation_agent_3d.cpp @@ -106,12 +106,12 @@ void NavigationAgent3D::_notification(int p_what) { // Search the navigation node and set it { - Navigation3D *nav = NULL; + Navigation3D *nav = nullptr; Node *p = get_parent(); - while (p != NULL) { + while (p != nullptr) { nav = Object::cast_to<Navigation3D>(p); - if (nav != NULL) - p = NULL; + if (nav != nullptr) + p = nullptr; else p = p->get_parent(); } @@ -122,8 +122,8 @@ void NavigationAgent3D::_notification(int p_what) { set_physics_process_internal(true); } break; case NOTIFICATION_EXIT_TREE: { - agent_parent = NULL; - set_navigation(NULL); + agent_parent = nullptr; + set_navigation(nullptr); set_physics_process_internal(false); } break; case NOTIFICATION_INTERNAL_PHYSICS_PROCESS: { @@ -142,8 +142,8 @@ void NavigationAgent3D::_notification(int p_what) { } NavigationAgent3D::NavigationAgent3D() : - agent_parent(NULL), - navigation(NULL), + agent_parent(nullptr), + navigation(nullptr), agent(RID()), target_desired_distance(1.0), navigation_height_offset(0.0), @@ -170,12 +170,12 @@ void NavigationAgent3D::set_navigation(Navigation3D *p_nav) { return; // Pointless navigation = p_nav; - NavigationServer3D::get_singleton()->agent_set_map(agent, navigation == NULL ? RID() : navigation->get_rid()); + NavigationServer3D::get_singleton()->agent_set_map(agent, navigation == nullptr ? RID() : navigation->get_rid()); } void NavigationAgent3D::set_navigation_node(Node *p_nav) { Navigation3D *nav = Object::cast_to<Navigation3D>(p_nav); - ERR_FAIL_COND(nav == NULL); + ERR_FAIL_COND(nav == nullptr); set_navigation(nav); } @@ -244,7 +244,7 @@ Vector3 NavigationAgent3D::get_target_location() const { Vector3 NavigationAgent3D::get_next_location() { update_navigation(); if (navigation_path.size() == 0) { - ERR_FAIL_COND_V(agent_parent == NULL, Vector3()); + ERR_FAIL_COND_V(agent_parent == nullptr, Vector3()); return agent_parent->get_global_transform().origin; } else { return navigation_path[nav_path_index] - Vector3(0, navigation_height_offset, 0); @@ -252,7 +252,7 @@ Vector3 NavigationAgent3D::get_next_location() { } real_t NavigationAgent3D::distance_to_target() const { - ERR_FAIL_COND_V(agent_parent == NULL, 0.0); + ERR_FAIL_COND_V(agent_parent == nullptr, 0.0); return agent_parent->get_global_transform().origin.distance_to(target_location); } @@ -306,8 +306,8 @@ String NavigationAgent3D::get_configuration_warning() const { void NavigationAgent3D::update_navigation() { - if (agent_parent == NULL) return; - if (navigation == NULL) return; + if (agent_parent == nullptr) return; + if (navigation == nullptr) return; if (update_frame_id == Engine::get_singleton()->get_physics_frames()) return; update_frame_id = Engine::get_singleton()->get_physics_frames(); diff --git a/scene/3d/navigation_obstacle_3d.cpp b/scene/3d/navigation_obstacle_3d.cpp index fa976e5d18..2ee2008799 100644 --- a/scene/3d/navigation_obstacle_3d.cpp +++ b/scene/3d/navigation_obstacle_3d.cpp @@ -49,12 +49,12 @@ void NavigationObstacle3D::_notification(int p_what) { // Search the navigation node and set it { - Navigation3D *nav = NULL; + Navigation3D *nav = nullptr; Node *p = get_parent(); - while (p != NULL) { + while (p != nullptr) { nav = Object::cast_to<Navigation3D>(p); - if (nav != NULL) - p = NULL; + if (nav != nullptr) + p = nullptr; else p = p->get_parent(); } @@ -65,7 +65,7 @@ void NavigationObstacle3D::_notification(int p_what) { set_physics_process_internal(true); } break; case NOTIFICATION_EXIT_TREE: { - set_navigation(NULL); + set_navigation(nullptr); set_physics_process_internal(false); } break; case NOTIFICATION_INTERNAL_PHYSICS_PROCESS: { @@ -87,7 +87,7 @@ void NavigationObstacle3D::_notification(int p_what) { } NavigationObstacle3D::NavigationObstacle3D() : - navigation(NULL), + navigation(nullptr), agent(RID()) { agent = NavigationServer3D::get_singleton()->agent_create(); } @@ -102,12 +102,12 @@ void NavigationObstacle3D::set_navigation(Navigation3D *p_nav) { return; // Pointless navigation = p_nav; - NavigationServer3D::get_singleton()->agent_set_map(agent, navigation == NULL ? RID() : navigation->get_rid()); + NavigationServer3D::get_singleton()->agent_set_map(agent, navigation == nullptr ? RID() : navigation->get_rid()); } void NavigationObstacle3D::set_navigation_node(Node *p_nav) { Navigation3D *nav = Object::cast_to<Navigation3D>(p_nav); - ERR_FAIL_COND(nav == NULL); + ERR_FAIL_COND(nav == nullptr); set_navigation(nav); } diff --git a/scene/3d/navigation_region_3d.cpp b/scene/3d/navigation_region_3d.cpp index 08c0fbf4d1..043b816033 100644 --- a/scene/3d/navigation_region_3d.cpp +++ b/scene/3d/navigation_region_3d.cpp @@ -123,9 +123,9 @@ void NavigationRegion3D::_notification(int p_what) { if (debug_view) { debug_view->queue_delete(); - debug_view = NULL; + debug_view = nullptr; } - navigation = NULL; + navigation = nullptr; } break; } } @@ -184,18 +184,18 @@ void _bake_navigation_mesh(void *p_user_data) { } void NavigationRegion3D::bake_navigation_mesh() { - ERR_FAIL_COND(bake_thread != NULL); + ERR_FAIL_COND(bake_thread != nullptr); BakeThreadsArgs *args = memnew(BakeThreadsArgs); args->nav_region = this; bake_thread = Thread::create(_bake_navigation_mesh, args); - ERR_FAIL_COND(bake_thread == NULL); + ERR_FAIL_COND(bake_thread == nullptr); } void NavigationRegion3D::_bake_finished(Ref<NavigationMesh> p_nav_mesh) { set_navigation_mesh(p_nav_mesh); - bake_thread = NULL; + bake_thread = nullptr; } String NavigationRegion3D::get_configuration_warning() const { @@ -247,9 +247,9 @@ NavigationRegion3D::NavigationRegion3D() { set_notify_transform(true); region = NavigationServer3D::get_singleton()->region_create(); - navigation = NULL; - debug_view = NULL; - bake_thread = NULL; + navigation = nullptr; + debug_view = nullptr; + bake_thread = nullptr; } NavigationRegion3D::~NavigationRegion3D() { diff --git a/scene/3d/node_3d.cpp b/scene/3d/node_3d.cpp index 7f444d59bf..0b7407e049 100644 --- a/scene/3d/node_3d.cpp +++ b/scene/3d/node_3d.cpp @@ -134,7 +134,7 @@ void Node3D::_notification(int p_what) { if (data.parent) data.C = data.parent->data.children.push_back(this); else - data.C = NULL; + data.C = nullptr; if (data.toplevel && !Engine::get_singleton()->is_editor_hint()) { @@ -158,14 +158,14 @@ void Node3D::_notification(int p_what) { get_tree()->xform_change_list.remove(&xform_change); if (data.C) data.parent->data.children.erase(data.C); - data.parent = NULL; - data.C = NULL; + data.parent = nullptr; + data.C = nullptr; data.toplevel_active = false; } break; case NOTIFICATION_ENTER_WORLD: { data.inside_world = true; - data.viewport = NULL; + data.viewport = nullptr; Node *parent = get_parent(); while (parent && !data.viewport) { data.viewport = Object::cast_to<Viewport>(parent); @@ -176,7 +176,7 @@ void Node3D::_notification(int p_what) { if (get_script_instance()) { - get_script_instance()->call_multilevel(SceneStringNames::get_singleton()->_enter_world, NULL, 0); + get_script_instance()->call_multilevel(SceneStringNames::get_singleton()->_enter_world, nullptr, 0); } #ifdef TOOLS_ENABLED if (Engine::get_singleton()->is_editor_hint() && get_tree()->is_node_being_edited(this)) { @@ -208,10 +208,10 @@ void Node3D::_notification(int p_what) { if (get_script_instance()) { - get_script_instance()->call_multilevel(SceneStringNames::get_singleton()->_exit_world, NULL, 0); + get_script_instance()->call_multilevel(SceneStringNames::get_singleton()->_exit_world, nullptr, 0); } - data.viewport = NULL; + data.viewport = nullptr; data.inside_world = false; } break; @@ -829,7 +829,7 @@ Node3D::Node3D() : data.toplevel = false; data.toplevel_active = false; data.scale = Vector3(1, 1, 1); - data.viewport = NULL; + data.viewport = nullptr; data.inside_world = false; data.visible = true; data.disable_scale = false; @@ -840,8 +840,8 @@ Node3D::Node3D() : #endif data.notify_local_transform = false; data.notify_transform = false; - data.parent = NULL; - data.C = NULL; + data.parent = nullptr; + data.C = nullptr; } Node3D::~Node3D() { diff --git a/scene/3d/path_3d.cpp b/scene/3d/path_3d.cpp index 0f1f9bb8a7..f06135f53d 100644 --- a/scene/3d/path_3d.cpp +++ b/scene/3d/path_3d.cpp @@ -229,7 +229,7 @@ void PathFollow3D::_notification(int p_what) { } break; case NOTIFICATION_EXIT_TREE: { - path = NULL; + path = nullptr; } break; } } @@ -409,7 +409,7 @@ PathFollow3D::PathFollow3D() { delta_offset = 0; h_offset = 0; v_offset = 0; - path = NULL; + path = nullptr; rotation_mode = ROTATION_XYZ; cubic = true; loop = true; diff --git a/scene/3d/physics_body_3d.cpp b/scene/3d/physics_body_3d.cpp index 37981f914c..2b6eb8ac8a 100644 --- a/scene/3d/physics_body_3d.cpp +++ b/scene/3d/physics_body_3d.cpp @@ -474,7 +474,7 @@ void RigidBody3D::_direct_state_changed(Object *p_state) { contact_monitor->locked = false; } - state = NULL; + state = nullptr; } void RigidBody3D::_notification(int p_what) { @@ -744,7 +744,7 @@ void RigidBody3D::set_contact_monitor(bool p_enabled) { } memdelete(contact_monitor); - contact_monitor = NULL; + contact_monitor = nullptr; } else { contact_monitor = memnew(ContactMonitor); @@ -754,7 +754,7 @@ void RigidBody3D::set_contact_monitor(bool p_enabled) { bool RigidBody3D::is_contact_monitor_enabled() const { - return contact_monitor != NULL; + return contact_monitor != nullptr; } void RigidBody3D::set_axis_lock(PhysicsServer3D::BodyAxis p_axis, bool p_lock) { @@ -910,7 +910,7 @@ RigidBody3D::RigidBody3D() : mass = 1; max_contacts_reported = 0; - state = NULL; + state = nullptr; gravity_scale = 1; linear_damp = -1; @@ -921,7 +921,7 @@ RigidBody3D::RigidBody3D() : ccd = false; custom_integrator = false; - contact_monitor = NULL; + contact_monitor = nullptr; can_sleep = true; PhysicsServer3D::get_singleton()->body_set_force_integration_callback(get_rid(), this, "_direct_state_changed"); @@ -1321,12 +1321,12 @@ KinematicBody3D::KinematicBody3D() : KinematicBody3D::~KinematicBody3D() { if (motion_cache.is_valid()) { - motion_cache->owner = NULL; + motion_cache->owner = nullptr; } for (int i = 0; i < slide_colliders.size(); i++) { if (slide_colliders[i].is_valid()) { - slide_colliders.write[i]->owner = NULL; + slide_colliders.write[i]->owner = nullptr; } } } @@ -1346,7 +1346,7 @@ Vector3 KinematicCollision3D::get_remainder() const { return collision.remainder; } Object *KinematicCollision3D::get_local_shape() const { - if (!owner) return NULL; + if (!owner) return nullptr; uint32_t ownerid = owner->shape_find_owner(collision.local_shape); return owner->shape_owner_get_owner(ownerid); } @@ -1357,7 +1357,7 @@ Object *KinematicCollision3D::get_collider() const { return ObjectDB::get_instance(collision.collider); } - return NULL; + return nullptr; } ObjectID KinematicCollision3D::get_collider_id() const { @@ -1374,7 +1374,7 @@ Object *KinematicCollision3D::get_collider_shape() const { } } - return NULL; + return nullptr; } int KinematicCollision3D::get_collider_shape_index() const { @@ -1420,7 +1420,7 @@ KinematicCollision3D::KinematicCollision3D() { collision.collider_shape = 0; collision.local_shape = 0; - owner = NULL; + owner = nullptr; } /////////////////////////////////////// @@ -2078,7 +2078,7 @@ void PhysicalBone3D::_notification(int p_what) { parent_skeleton->unbind_physical_bone_from_bone(bone_id); } } - parent_skeleton = NULL; + parent_skeleton = nullptr; if (joint.is_valid()) { PhysicsServer3D::get_singleton()->free(joint); joint = RID(); @@ -2181,7 +2181,7 @@ void PhysicalBone3D::_bind_methods() { Skeleton3D *PhysicalBone3D::find_skeleton_parent(Node *p_parent) { if (!p_parent) { - return NULL; + return nullptr; } Skeleton3D *s = Object::cast_to<Skeleton3D>(p_parent); return s ? s : find_skeleton_parent(p_parent->get_parent()); @@ -2333,7 +2333,7 @@ void PhysicalBone3D::set_joint_type(JointType p_joint_type) { if (joint_data) memdelete(joint_data); - joint_data = NULL; + joint_data = nullptr; switch (p_joint_type) { case JOINT_TYPE_PIN: joint_data = memnew(PinJointData); @@ -2501,8 +2501,8 @@ PhysicalBone3D::PhysicalBone3D() : #ifdef TOOLS_ENABLED gizmo_move_joint(false), #endif - joint_data(NULL), - parent_skeleton(NULL), + joint_data(nullptr), + parent_skeleton(nullptr), simulate_physics(false), _internal_simulate_physics(false), bone_id(-1), @@ -2588,7 +2588,7 @@ void PhysicalBone3D::_stop_physics_simulation() { PhysicsServer3D::get_singleton()->body_set_collision_mask(get_rid(), 0); } if (_internal_simulate_physics) { - PhysicsServer3D::get_singleton()->body_set_force_integration_callback(get_rid(), NULL, ""); + PhysicsServer3D::get_singleton()->body_set_force_integration_callback(get_rid(), nullptr, ""); parent_skeleton->set_bone_global_pose_override(bone_id, Transform(), 0.0, false); set_as_toplevel(false); _internal_simulate_physics = false; diff --git a/scene/3d/physics_joint_3d.cpp b/scene/3d/physics_joint_3d.cpp index f6b3e79300..591c17a91e 100644 --- a/scene/3d/physics_joint_3d.cpp +++ b/scene/3d/physics_joint_3d.cpp @@ -45,8 +45,8 @@ void Joint3D::_update_joint(bool p_only_free) { if (p_only_free || !is_inside_tree()) return; - Node *node_a = has_node(get_node_a()) ? get_node(get_node_a()) : (Node *)NULL; - Node *node_b = has_node(get_node_b()) ? get_node(get_node_b()) : (Node *)NULL; + Node *node_a = has_node(get_node_a()) ? get_node(get_node_a()) : (Node *)nullptr; + Node *node_b = has_node(get_node_b()) ? get_node(get_node_b()) : (Node *)nullptr; PhysicsBody3D *body_a = Object::cast_to<PhysicsBody3D>(node_a); PhysicsBody3D *body_b = Object::cast_to<PhysicsBody3D>(node_b); diff --git a/scene/3d/ray_cast_3d.cpp b/scene/3d/ray_cast_3d.cpp index d00af3b128..a18da61656 100644 --- a/scene/3d/ray_cast_3d.cpp +++ b/scene/3d/ray_cast_3d.cpp @@ -81,7 +81,7 @@ bool RayCast3D::is_colliding() const { Object *RayCast3D::get_collider() const { if (against.is_null()) - return NULL; + return nullptr; return ObjectDB::get_instance(against); } @@ -387,7 +387,7 @@ void RayCast3D::_clear_debug_shape() { else memdelete(mi); - debug_shape = NULL; + debug_shape = nullptr; } RayCast3D::RayCast3D() { @@ -398,7 +398,7 @@ RayCast3D::RayCast3D() { against_shape = 0; collision_mask = 1; cast_to = Vector3(0, -1, 0); - debug_shape = NULL; + debug_shape = nullptr; exclude_parent_body = true; collide_with_areas = false; collide_with_bodies = true; diff --git a/scene/3d/skeleton_3d.cpp b/scene/3d/skeleton_3d.cpp index 1b05641c9d..59a6e23005 100644 --- a/scene/3d/skeleton_3d.cpp +++ b/scene/3d/skeleton_3d.cpp @@ -685,19 +685,19 @@ void Skeleton3D::bind_physical_bone_to_bone(int p_bone, PhysicalBone3D *p_physic void Skeleton3D::unbind_physical_bone_from_bone(int p_bone) { ERR_FAIL_INDEX(p_bone, bones.size()); - bones.write[p_bone].physical_bone = NULL; + bones.write[p_bone].physical_bone = nullptr; _rebuild_physical_bones_cache(); } PhysicalBone3D *Skeleton3D::get_physical_bone(int p_bone) { - ERR_FAIL_INDEX_V(p_bone, bones.size(), NULL); + ERR_FAIL_INDEX_V(p_bone, bones.size(), nullptr); return bones[p_bone].physical_bone; } PhysicalBone3D *Skeleton3D::get_physical_bone_parent(int p_bone) { - ERR_FAIL_INDEX_V(p_bone, bones.size(), NULL); + ERR_FAIL_INDEX_V(p_bone, bones.size(), nullptr); if (bones[p_bone].cache_parent_physical_bone) { return bones[p_bone].cache_parent_physical_bone; @@ -707,11 +707,11 @@ PhysicalBone3D *Skeleton3D::get_physical_bone_parent(int p_bone) { } PhysicalBone3D *Skeleton3D::_get_physical_bone_parent(int p_bone) { - ERR_FAIL_INDEX_V(p_bone, bones.size(), NULL); + ERR_FAIL_INDEX_V(p_bone, bones.size(), nullptr); const int parent_bone = bones[p_bone].parent; if (0 > parent_bone) { - return NULL; + return nullptr; } PhysicalBone3D *pb = bones[parent_bone].physical_bone; diff --git a/scene/3d/skeleton_3d.h b/scene/3d/skeleton_3d.h index 2ae04aa575..08b8691658 100644 --- a/scene/3d/skeleton_3d.h +++ b/scene/3d/skeleton_3d.h @@ -112,8 +112,8 @@ private: global_pose_override_amount = 0; global_pose_override_reset = false; #ifndef _3D_DISABLED - physical_bone = NULL; - cache_parent_physical_bone = NULL; + physical_bone = nullptr; + cache_parent_physical_bone = nullptr; #endif // _3D_DISABLED } }; diff --git a/scene/3d/skeleton_ik_3d.cpp b/scene/3d/skeleton_ik_3d.cpp index a6c3e25399..7366290ed3 100644 --- a/scene/3d/skeleton_ik_3d.cpp +++ b/scene/3d/skeleton_ik_3d.cpp @@ -42,7 +42,7 @@ FabrikInverseKinematic::ChainItem *FabrikInverseKinematic::ChainItem::find_child return &children.write[i]; } } - return NULL; + return nullptr; } FabrikInverseKinematic::ChainItem *FabrikInverseKinematic::ChainItem::add_child(const BoneId p_bone_id) { @@ -65,7 +65,7 @@ bool FabrikInverseKinematic::build_chain(Task *p_task, bool p_force_simple_chain chain.chain_root.initial_transform = p_task->skeleton->get_bone_global_pose(chain.chain_root.bone); chain.chain_root.current_pos = chain.chain_root.initial_transform.origin; chain.chain_root.pb = p_task->skeleton->get_physical_bone(chain.chain_root.bone); - chain.middle_chain_item = NULL; + chain.middle_chain_item = nullptr; // Holds all IDs that are composing a single chain in reverse order Vector<BoneId> chain_ids; @@ -119,7 +119,7 @@ bool FabrikInverseKinematic::build_chain(Task *p_task, bool p_force_simple_chain } if (!middle_chain_item_id) - chain.middle_chain_item = NULL; + chain.middle_chain_item = nullptr; // Initialize current tip chain.tips.write[x].chain_item = sub_chain; @@ -226,14 +226,14 @@ void FabrikInverseKinematic::solve_simple_forwards(Chain &r_chain, bool p_solve_ if (p_solve_magnet && sub_chain_root == r_chain.middle_chain_item) { // In case of magnet solving this is the tip - sub_chain_root = NULL; + sub_chain_root = nullptr; } else { sub_chain_root = &child; } } else { // Is tip - sub_chain_root = NULL; + sub_chain_root = nullptr; } } } @@ -251,7 +251,7 @@ FabrikInverseKinematic::Task *FabrikInverseKinematic::create_simple_task(Skeleto if (!build_chain(task)) { free_task(task); - return NULL; + return nullptr; } return task; @@ -328,7 +328,7 @@ void FabrikInverseKinematic::solve(Task *p_task, real_t blending_delta, bool ove if (!ci->children.empty()) ci = &ci->children.write[0]; else - ci = NULL; + ci = nullptr; } } @@ -432,14 +432,14 @@ SkeletonIK3D::SkeletonIK3D() : use_magnet(false), min_distance(0.01), max_iterations(10), - skeleton(NULL), - target_node_override(NULL), - task(NULL) { + skeleton(nullptr), + target_node_override(nullptr), + task(nullptr) { } SkeletonIK3D::~SkeletonIK3D() { FabrikInverseKinematic::free_task(task); - task = NULL; + task = nullptr; } void SkeletonIK3D::set_root_bone(const StringName &p_root_bone) { @@ -479,7 +479,7 @@ const Transform &SkeletonIK3D::get_target_transform() const { void SkeletonIK3D::set_target_node(const NodePath &p_node) { target_node_path_override = p_node; - target_node_override = NULL; + target_node_override = nullptr; reload_goal(); } @@ -550,7 +550,7 @@ Transform SkeletonIK3D::_get_target_transform() { void SkeletonIK3D::reload_chain() { FabrikInverseKinematic::free_task(task); - task = NULL; + task = nullptr; if (!skeleton) return; diff --git a/scene/3d/skeleton_ik_3d.h b/scene/3d/skeleton_ik_3d.h index ebfebd1e66..5fbbe6e9e7 100644 --- a/scene/3d/skeleton_ik_3d.h +++ b/scene/3d/skeleton_ik_3d.h @@ -64,9 +64,9 @@ class FabrikInverseKinematic { Vector3 current_ori; ChainItem() : - parent_item(NULL), + parent_item(nullptr), bone(-1), - pb(NULL), + pb(nullptr), length(0) {} ChainItem *find_child(const BoneId p_bone_id); @@ -78,8 +78,8 @@ class FabrikInverseKinematic { const EndEffector *end_effector; ChainTip() : - chain_item(NULL), - end_effector(NULL) {} + chain_item(nullptr), + end_effector(nullptr) {} ChainTip(ChainItem *p_chain_item, const EndEffector *p_end_effector) : chain_item(p_chain_item), @@ -115,7 +115,7 @@ public: Transform goal_global_transform; Task() : - skeleton(NULL), + skeleton(nullptr), min_distance(0.01), max_iterations(10), root_bone(-1) {} diff --git a/scene/3d/soft_body_3d.cpp b/scene/3d/soft_body_3d.cpp index 6d2808cfce..6092818252 100644 --- a/scene/3d/soft_body_3d.cpp +++ b/scene/3d/soft_body_3d.cpp @@ -99,7 +99,7 @@ void SoftBodyRenderingServerHandler::set_aabb(const AABB &p_aabb) { SoftBody3D::PinnedPoint::PinnedPoint() : point_index(-1), - spatial_attachment(NULL) { + spatial_attachment(nullptr) { } SoftBody3D::PinnedPoint::PinnedPoint(const PinnedPoint &obj_tocopy) { @@ -454,7 +454,7 @@ void SoftBody3D::prepare_physics_server() { if (get_mesh().is_valid()) PhysicsServer3D::get_singleton()->soft_body_set_mesh(physics_rid, get_mesh()); else - PhysicsServer3D::get_singleton()->soft_body_set_mesh(physics_rid, NULL); + PhysicsServer3D::get_singleton()->soft_body_set_mesh(physics_rid, nullptr); return; } @@ -466,7 +466,7 @@ void SoftBody3D::prepare_physics_server() { RS::get_singleton()->connect("frame_pre_draw", callable_mp(this, &SoftBody3D::_draw_soft_mesh)); } else { - PhysicsServer3D::get_singleton()->soft_body_set_mesh(physics_rid, NULL); + PhysicsServer3D::get_singleton()->soft_body_set_mesh(physics_rid, nullptr); if (RS::get_singleton()->is_connected("frame_pre_draw", callable_mp(this, &SoftBody3D::_draw_soft_mesh))) { RS::get_singleton()->disconnect("frame_pre_draw", callable_mp(this, &SoftBody3D::_draw_soft_mesh)); } @@ -808,7 +808,7 @@ void SoftBody3D::_remove_pinned_point(int p_point_index) { int SoftBody3D::_get_pinned_point(int p_point_index, SoftBody3D::PinnedPoint *&r_point) const { const int id = _has_pinned_point(p_point_index); if (-1 == id) { - r_point = NULL; + r_point = nullptr; return -1; } else { r_point = const_cast<SoftBody3D::PinnedPoint *>(&pinned_points.ptr()[id]); diff --git a/scene/3d/sprite_3d.cpp b/scene/3d/sprite_3d.cpp index 360e95e76a..85e5ebc475 100644 --- a/scene/3d/sprite_3d.cpp +++ b/scene/3d/sprite_3d.cpp @@ -83,8 +83,8 @@ void SpriteBase3D::_notification(int p_what) { if (parent_sprite) { parent_sprite->children.erase(pI); - pI = NULL; - parent_sprite = NULL; + pI = nullptr; + parent_sprite = nullptr; } } } @@ -364,8 +364,8 @@ SpriteBase3D::SpriteBase3D() { centered = true; hflip = false; vflip = false; - parent_sprite = NULL; - pI = NULL; + parent_sprite = nullptr; + pI = nullptr; for (int i = 0; i < FLAG_MAX; i++) flags[i] = i == FLAG_TRANSPARENT || i == FLAG_DOUBLE_SIDED; @@ -441,7 +441,7 @@ void Sprite3D::_draw() { // Properly setup UVs for impostor textures (AtlasTexture). Ref<AtlasTexture> atlas_tex = texture; - if (atlas_tex != NULL) { + if (atlas_tex != nullptr) { src_tsize[0] = atlas_tex->get_atlas()->get_width(); src_tsize[1] = atlas_tex->get_atlas()->get_height(); } @@ -775,7 +775,7 @@ void AnimatedSprite3D::_draw() { // Properly setup UVs for impostor textures (AtlasTexture). Ref<AtlasTexture> atlas_tex = texture; - if (atlas_tex != NULL) { + if (atlas_tex != nullptr) { src_tsize[0] = atlas_tex->get_atlas()->get_width(); src_tsize[1] = atlas_tex->get_atlas()->get_height(); } diff --git a/scene/3d/vehicle_body_3d.cpp b/scene/3d/vehicle_body_3d.cpp index ac7608a3d5..5c2fa59a21 100644 --- a/scene/3d/vehicle_body_3d.cpp +++ b/scene/3d/vehicle_body_3d.cpp @@ -99,7 +99,7 @@ void VehicleWheel3D::_notification(int p_what) { if (!cb) return; cb->wheels.erase(this); - body = NULL; + body = nullptr; } } @@ -385,7 +385,7 @@ VehicleWheel3D::VehicleWheel3D() { m_clippedInvContactDotSuspension = 1.0; m_raycastInfo.m_isInContact = false; - body = NULL; + body = nullptr; } void VehicleBody3D::_update_wheel_transform(VehicleWheel3D &wheel, PhysicsDirectBodyState3D *s) { @@ -454,7 +454,7 @@ real_t VehicleBody3D::_ray_cast(int p_idx, PhysicsDirectBodyState3D *s) { bool col = ss->intersect_ray(source, target, rr, exclude); - wheel.m_raycastInfo.m_groundObject = 0; + wheel.m_raycastInfo.m_groundObject = nullptr; if (col) { param = source.distance_to(rr.position) / source.distance_to(target); @@ -917,7 +917,7 @@ void VehicleBody3D::_direct_state_changed(Object *p_state) { wheel.m_deltaRotation *= real_t(0.99); //damping of rotation when not in contact } - state = NULL; + state = nullptr; } void VehicleBody3D::set_engine_force(float p_engine_force) { @@ -988,7 +988,7 @@ VehicleBody3D::VehicleBody3D() { engine_force = 0; brake = 0; - state = NULL; + state = nullptr; ccd = false; exclude.insert(get_rid()); |