#1725 do not clear target during trading.

This commit is contained in:
Nils Ascheuer 2023-01-18 08:13:22 +01:00
parent a537d52f48
commit 43b61ea6d9

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;
}