fix
This commit is contained in:
@@ -27,7 +27,6 @@ use bevy_rand::prelude::*;
|
||||
/// Main task executor. Runs in FixedUpdate.
|
||||
pub fn task_executor_system(
|
||||
mut commands: Commands,
|
||||
tilemap: Res<TileMap>,
|
||||
mut tilemap_mut: ResMut<TileMap>,
|
||||
chunk_map: Res<ChunkMap>,
|
||||
asset_server: Res<AssetServer>,
|
||||
@@ -103,7 +102,7 @@ pub fn task_executor_system(
|
||||
transform,
|
||||
&mut ambulatory,
|
||||
&mut sprite,
|
||||
&tilemap,
|
||||
&*tilemap_mut,
|
||||
&chunk_map,
|
||||
&behaviour.idle,
|
||||
&mut rng,
|
||||
@@ -119,7 +118,7 @@ pub fn task_executor_system(
|
||||
.abs()
|
||||
.max((entity_pos.y - target.y).abs());
|
||||
|
||||
if distance <= *threshold_tiles || !tilemap.is_standable(*target) {
|
||||
if distance <= *threshold_tiles || !tilemap_mut.is_standable(*target) {
|
||||
*state = TaskState::Completed;
|
||||
} else {
|
||||
ambulatory.target = Some(Vec3::new(
|
||||
|
||||
Reference in New Issue
Block a user