Merge branch 'nixda/trading_message_fix' into 'master'

#1725 do not clear target during trading.

See merge request veloren/veloren!3767
This commit is contained in:
Isse 2023-01-18 13:55:54 +00:00
commit 09cea6aca9

View File

@ -601,7 +601,9 @@ fn update_target_awareness(bdata: &mut BehaviorData) -> bool {
.change_by(STD_AWARENESS_DECAY_RATE * read_data.dt.0);
}
if bdata.agent.awareness.state() == AwarenessState::Unaware {
if bdata.agent.awareness.state() == AwarenessState::Unaware
&& !bdata.agent.behavior.is(BehaviorState::TRADING)
{
bdata.agent.target = None;
}