Merge branch 'zesterer/small-fixes' into 'master'

Prevent tamed entities constantly trying to 'return home'

See merge request veloren/veloren!776
This commit is contained in:
Joshua Barretto 2020-01-29 17:00:01 +00:00
commit 52eb4d5946

View File

@ -617,13 +617,14 @@ impl Server {
.map(|(entity, _, _)| entity); .map(|(entity, _, _)| entity);
nearest_tameable nearest_tameable
} { } {
let _ = state let _ = state.ecs().write_storage().insert(
.ecs() tameable_entity,
.write_storage::<comp::Alignment>() comp::Alignment::Owned(entity),
.insert( );
tameable_entity, let _ = state.ecs().write_storage().insert(
comp::Alignment::Owned(entity), tameable_entity,
); comp::Agent::default(),
);
false false
} else { } else {
true true