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