Browse Source

Merge pull request #79916 from smix8/navobstacle_mutex_4.x

Update NavObstacle creation to new Mutex style
Yuri Sizov 2 years ago
parent
commit
8367152723
1 changed files with 2 additions and 2 deletions
  1. 2 2
      modules/navigation/godot_navigation_server.cpp

+ 2 - 2
modules/navigation/godot_navigation_server.cpp

@@ -816,8 +816,8 @@ COMMAND_2(agent_set_avoidance_priority, RID, p_agent, real_t, p_priority) {
 }
 
 RID GodotNavigationServer::obstacle_create() {
-	GodotNavigationServer *mut_this = const_cast<GodotNavigationServer *>(this);
-	MutexLock lock(mut_this->operations_mutex);
+	MutexLock lock(operations_mutex);
+
 	RID rid = obstacle_owner.make_rid();
 	NavObstacle *obstacle = obstacle_owner.get_or_null(rid);
 	obstacle->set_self(rid);